Theme images by Storman. Powered by Blogger.

Software Testing

[best practices][feat1]

Recent

recentposts

Popular

Comments

recentcomments

Most Recent

Random Posts

randomposts

Facebook

page/http://facebook.com/letztest

Thursday, July 28, 2016

How to find Xpaths using WebDriver Element Locator

 

Finding/Writing XPath is one of the greatest challenge that most of the automation testers come across. In this post I am going to introduce a new plugin before you which will help you in finding the right XPaths just by a click.

This plugin generates different xpaths using xpath finding techniques. With the help of this you can easily generate xpaths for C#, Java, Python, Ruby.

For downloading this plugin for Firefox > Navigate to below url:
https://addons.mozilla.org/en-us/firefox/addon/element-locator-for-webdriv/
[Update/ This plugin is deprecated and hence I reccomend to use the below one]

Firefox : https://addons.mozilla.org/en-US/firefox/addon/truepath/

Chrome: https://chrome.google.com/webstore/detail/truepath/mgjhkhhbkkldiihlajcnlfchfcmhipmn 


Once installed, you can navigate to any element and right click on that element which will generate xpath for that particular element. In the below image we have managed to find XPaths for the donate button.



For the new one it looks like this:




Now I am sure that you have got much relief for the question:

How to find XPaths in Selenium :) 

Happy Testing !

0 on: "How to find Xpaths using WebDriver Element Locator"