Skip Menu |

This queue is for tickets about the Test-WWW-Selenium CPAN distribution.

Report information
The Basics
Id: 68110
Status: resolved
Priority: 0/
Queue: Test-WWW-Selenium

People
Owner: Nobody in particular
Requestors: javibarroso [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Inconsistence between get_xpath_count and assign_id
Hi, I have a web where: my $n_issues=$sel->get_xpath_count("(//td[starts-with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\@title)>0]/\@id)[1]"); Returns 1 But: $sel->assign_id("(//td[starts-with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\@title)>0]/\@id)[1]","prueba"); Returns: Element (//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] not found Logs in selenium 2.0b3 : 11:53:39.219 INFO - Command request: getXpathCount[(//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1], ] on session b2b316ebf3d8453ea08f995b489d83ef 11:53:39.269 INFO - Executing: |getXpathCount | (//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] | | 11:53:39.276 INFO - Got result: OK,1 on session b2b316ebf3d8453ea08f995b489d83ef 11:53:39.279 INFO - Command request: assignId[(//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1], prueba] on session b2b316ebf3d8453ea08f995b489d83ef 11:53:39.288 INFO - Executing: |assignId | (//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] | prueba | 11:53:39.303 ERROR - Element (//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] not found 11:53:39.306 INFO - Got result: ERROR: Element (//td[starts-with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] not found on session b2b316ebf3d8453ea08f995b489d83ef I don't know where is my fail here :(. I think attaching only the html will don't help to solve this issue. Do you have any tip for me ? Thanks!
From: javibarroso [...] gmail.com
I forget that in firebug I can select with $x this element (I don't know how can I simulate assign command Regards On Wed May 11 06:00:25 2011, javibarroso@gmail.com wrote: Show quoted text
> Hi, > > I have a web where: > > my $n_issues=$sel->get_xpath_count("(//td[starts- >
with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\ @title)>0]/\@id)[1]"); Show quoted text
> > Returns 1 > > But: > $sel->assign_id("(//td[starts- >
with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\ @title)>0]/\@id)[1]","prueba"); Show quoted text
> > Returns: > Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> not found > > Logs in selenium 2.0b3 : > 11:53:39.219 INFO - Command request: getXpathCount[(//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1], Show quoted text
> ] on > session b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.269 INFO - Executing: |getXpathCount | (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> | | > 11:53:39.276 INFO - Got result: OK,1 on session > b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.279 INFO - Command request: assignId[(//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1], Show quoted text
> prueba] on > session b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.288 INFO - Executing: |assignId | (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> | prueba | > 11:53:39.303 ERROR - Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> not found > 11:53:39.306 INFO - Got result: ERROR: Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> not found on > session b2b316ebf3d8453ea08f995b489d83ef > > > I don't know where is my fail here :(. I think attaching only the html > will don't help to solve this issue. > > Do you have any tip for me ? > > Thanks!
From: javibarroso [...] gmail.com
Ok, so I misread man page, sorry where $sel->assign_id("(//td[starts-.. should be: $sel->assign_id("xpath=(//td[starts... Thank you ! On Wed May 11 06:00:25 2011, javibarroso@gmail.com wrote: Show quoted text
> Hi, > > I have a web where: > > my $n_issues=$sel->get_xpath_count("(//td[starts- >
with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\ @title)>0]/\@id)[1]"); Show quoted text
> > Returns 1 > > But: > $sel->assign_id("(//td[starts- >
with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\ @title)>0]/\@id)[1]","prueba"); Show quoted text
> > Returns: > Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> not found > > Logs in selenium 2.0b3 : > 11:53:39.219 INFO - Command request: getXpathCount[(//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1], Show quoted text
> ] on > session b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.269 INFO - Executing: |getXpathCount | (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> | | > 11:53:39.276 INFO - Got result: OK,1 on session > b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.279 INFO - Command request: assignId[(//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1], Show quoted text
> prueba] on > session b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.288 INFO - Executing: |assignId | (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> | prueba | > 11:53:39.303 ERROR - Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> not found > 11:53:39.306 INFO - Got result: ERROR: Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@t itle)>0]/@id)[1] Show quoted text
> not found on > session b2b316ebf3d8453ea08f995b489d83ef > > > I don't know where is my fail here :(. I think attaching only the html > will don't help to solve this issue. > > Do you have any tip for me ? > > Thanks!
From: javibarroso [...] gmail.com
Please, close this bug, I'm trying to do it, but I cannt Sorry wasting your time :( On Wed May 11 06:00:25 2011, javibarroso@gmail.com wrote: Show quoted text
> Hi, > > I have a web where: > > my $n_issues=$sel->get_xpath_count("(//td[starts- >
with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\@title)>0]/\@id)[1]"); Show quoted text
> > Returns 1 > > But: > $sel->assign_id("(//td[starts- >
with(\@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(\@title)>0]/\@id)[1]","prueba"); Show quoted text
> > Returns: > Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] Show quoted text
> not found > > Logs in selenium 2.0b3 : > 11:53:39.219 INFO - Command request: getXpathCount[(//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1], Show quoted text
> ] on > session b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.269 INFO - Executing: |getXpathCount | (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] Show quoted text
> | | > 11:53:39.276 INFO - Got result: OK,1 on session > b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.279 INFO - Command request: assignId[(//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1], Show quoted text
> prueba] on > session b2b316ebf3d8453ea08f995b489d83ef > 11:53:39.288 INFO - Executing: |assignId | (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] Show quoted text
> | prueba | > 11:53:39.303 ERROR - Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] Show quoted text
> not found > 11:53:39.306 INFO - Got result: ERROR: Element (//td[starts- >
with(@id,'formIncidentsUnasigned:incidentsListToUser')]/a/span[number(@title)>0]/@id)[1] Show quoted text
> not found on > session b2b316ebf3d8453ea08f995b489d83ef > > > I don't know where is my fail here :(. I think attaching only the html > will don't help to solve this issue. > > Do you have any tip for me ? > > Thanks!
Seems to be resolved :) closing.