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 MRI in Internet Explorer browser to validating the XPath Expressions and CSS Selectors.
Note: MRI is only available in the Internet Explorer browser and can only be used for validating the XPath Expressions and CSS Selectors.
In this article, I am going to practically demonstrate validating XPath Expressions and CSS Selectors using the MRI in Internet Explorer.
Let’s get started.
Selenium Locators – Installing and using MRI in Internet Explorer
Follow the below steps for validating XPath Expressions and CSS Selectors using MRI in Internet Explorer browser:
1) Open Internet Explorer browser, right-click on the tabs bar and select to show ‘Favourites bar’ as shown below:
2) Observe that the ‘Favorites bar’ will be displayed as shown below:
3) Navigate to http://westciv.com/mri/ as shown below:
4) Drag and drop the ‘MRI’ button on to the ‘Favourites bar’ as shown below:
5) Click the ‘Yes’ button on the ‘Do you want to add this bookmark?’ dialog as shown below:
6) Observe that ‘MRI’ bookmark got added to the ‘Favourites bar’ as shown below:
7) Navigate to any application URL say http://omayo.blogspot.com/ as shown below:
8) Click on the ‘MRI’ in the Favorites bar to launch it as shown below:
9) Let’s validate an XPath Expression using MRI.
Enter an XPath Expression say //input[@name=’q’] into the MRI text field, click on ‘MRI’ button and observe that the ‘search’ text field on the application will be highlighted as shown below:
10) Similarly, Let’s validate a CSS Selector using MRI.
Enter a CSS Selector say #but2 into the MRI text field, click on ‘MRI’ button and observe that the ‘Button2’ button on the application will be highlighted 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.