Hi,
I am trying to get the count of all selecttag in a webpage and i am using the below code .. but the count returns '0' even though there are selecttag in the webpage
Ranorex.WebDocument We1 = "/dom[@PageUrl~'^http://xyz/abc/']";
Console.WriteLine(We1.Find("./select").count);
Thanks
kiran pol
Getting count of selecttag in a webpage
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Getting count of selecttag in a webpage
Hi,
Please take a look to the documentation
http://www.ranorex.com/support/user-gui ... xpath.html
and our screen casts http://www.ranorex.com/support/screencasts.html
about to use the RxPath.
Regards,
Peter
Ranorex Support Team
use ".//select" instead of "./select". ".//" identifies all elements that are descendants of the current element.kiran.pol wrote:Ranorex.WebDocument We1 = "/dom[@PageUrl~'^http://xyz/abc/']";
Console.WriteLine(We1.Find("./select").count);
Please take a look to the documentation
http://www.ranorex.com/support/user-gui ... xpath.html
and our screen casts http://www.ranorex.com/support/screencasts.html
about to use the RxPath.
Regards,
Peter
Ranorex Support Team