I'd advice to use an xpath like

//[EMAIL PROTECTED]'app_content_w_nav_sub_and_pad']//img/@src

since it doesn't rely on the rather accidental ordering of the
div's.

And - yes - different XPath implementation can differ in
behaviour, especially in indexing nodes of same type vs. absolute
positions of nodes in the containment ('child index').

cheers
Mittie

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Michael Knapp
> Sent: Freitag, 24. Februar 2006 20:52
> To: [email protected]
> Subject: [Webtest] Xpath parsing problems
> 
> 
> I'm using a verifyXpath step to verify presence of an image call.  I'm
> using 3 different xpath tools to generate the path -- firefox DOM
> inspector, view Xpath extension, and xpather extension.  All of these
> pathers agree with each other, that the xpath 
> '/html/body/div/div[1]/div[2]/img/@src' 
> for the page 
> http://www.restorationhardware.com/rh/info/job_headquarters_directions.j
> sp
> Should give me
> '/estore/media/content/info/rh_corp_map.jpg'
> 
> 
> However, webtest keeps evaluating it as '':
> [verifyXPath]  INFO (com.canoo.webtest.steps.Step) - Message was: xpath
> test: /html/body/div/div[1]/div[2]/img/@src evaluates to: , expected
> value is: /estore/media/content/info/rh_corp_map.jpg
> 
> I've tried xpathing both the live page and the page as saved by webtest.
> Neither works.  I've used xpaths with much success elsewhere.  Any
> ideas?
> Thanks
> mike
> :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:
> T. Michael Knapp
> QA Engineer :: Restoration Hardware
> [EMAIL PROTECTED]
> 510 282-5399 [mobile]
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to