Need help figuring out XPATH
Seniors, I am trying to teach myself Selenium with Java. I am not able to create Xpath and Firebug is giving me this from code : <span class="label-text">One-way</span>.
I am trying to click Oneway on website. How would you create Xpath with the code above? I am not from Java background so please forgive if this is basic in Java world.
Try using the generic convention for forming an XPath : //<objectType>[@property=’propertyvalue’].
i.e. In this case : //span[@class=’label-text’].
This should work in case these are the unique property value combination for this object.
Originally Posted by tanejanidhi6
I am working in a software qa company that provides functional testing services and below are few Xpath's that you can try:-
2. //span[contains(text(), 'One-way']
Note:- The span text and span class should be unique on that page.
Post Thanks / Like - 1 Thanks, 0 Likes, 0 Dislikes