The two Xpath expressions are not equivalent.  In particular, // is not the
same as */.  I suspect that is the root of the problem.
 
*/form == select all <form> elements that are children of the current
context node
 
//form == select all <form> elements that are descendants of the current
context node
 
Make sense?

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place
http://www.tabbysplace.org <http://www.tabbysplace.org/> 


-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Winney, Mark
Sent: Wednesday, April 28, 2010 1:25 PM
To: [email protected]
Subject: [Webtest] WebTest XPath......



Hi,

I have been using WebTest and XPath for a while, and I know WebTest uses
org.apache.xpath, but can anyone tell me why the following XPath statement
fails with a 

 

xpath test:  */fo...@name="login"]/*/sele...@id="locale"] matched no nodes

 

      <verifyXPath description="simple match"
xpath='*/fo...@name="login"]/*/sele...@id="locale"]'/>

 

And this one passes the test

 

      <verifyXPath description="simple match"
xpath='//fo...@name="login"]//sele...@id="locale"]'/>

 

Thanks

Mark Winney



 

_____________

The information contained in this message is proprietary and/or
confidential. If you are not the intended recipient, please: (i) delete the
message and all copies; (ii) do not disclose, distribute or use the message
in any manner; and (iii) notify the sender immediately. In addition, please
be aware that any message addressed to our domain is subject to archiving
and review by persons other than the intended recipient. Thank you.
_____________


Reply via email to