As explained in one of the previous posts, Firebug and Firepath add-ons for locating and validating the UI elements on the page got deprecated and discontinued and we have to use alternative add-ons in place of Firebug and Firepath.
Though ChroPath is the best alternative of Firebug & Firepath in locating the UI elements and validating the XPath Expressions & CSS Selectors, we can also use Try XPath add-on for validating the XPath Expressions.
Note: Try XPath add-on is only available in Firefox browser and can only be used to validate the XPath Expressions.
In this article, I am going to practically demonstrate installing and using Try XPath add-on for validating the XPath Expressions in Firefox browser.
Let’s get started.
Selenium Locators – Installing and using Try XPath add-on
Follow the below steps for installing and using Try XPath:
1) Open Firefox browser, google search for ‘Try XPath’ and click on the below link which is displayed in the search results:
2) In the displayed Firefox Add-on’s page of ‘Try XPath’, click on ‘Add to Firefox’ button as shown below:
3) In the displayed dialog asking for permissions, click on the ‘Add’ button as shown below:
4) Dialog confirming that the ‘Try XPath’ add-on is successfully added will be displayed and click on the ‘OK’ button as shown below:
Also, observe that the ‘Try XPath’ add-on option got added to the Firefox browser as shown below:
5) Navigate to any application URL say http://omayo.blogspot.com/ in the Firefox browser as shown below:
6) Click on the ‘TX’ option, select ‘XPath ANY_TYPE’ option in the Way dropdown field, enter the XPath Expression to be validated into the ‘Expression’ text field and click on ‘Execute’ button as shown below:
Observe that ‘Button2’ button got located using the Executed XPath Expression in ‘Try XPath’ as shown below:
Here concludes this article.
In the next article, I will explain a different alternative for Firebug and Firepath.
- > To learn more about Selenium, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to contribute to the Software Testing Community in all possible ways.