Hiya testers! Welcome to yet another explore-along post.
We recently discussed on locating elements on the web page using XPath. You may use the page’s source code and come up with an extraordinary XPath but it might not work as expected. I understand it is not very motivating and all that, but XPath strategy is quite complex and often used by advanced Selenium testers. Come on, there is no point in brooding over it.
It was once said my minions, if plan A fails remember you have 25 letters left! Hence, no giving up! We, mighty, invincible, unbeatable testers, are going to use Firebug to our advantage today.
Firebug comes as an add-on for Mozilla Firefox browser.
Steps to Install:
Open Firefox browser. Go to https://getfirebug.com/ and click on “Add to Firefox” button.
Click “Install” to begin the installation.
Once the installation completes, a notification appears as below.
Firebug icon will automatically be added to the browser’s toolbar as well.
Inspecting the required element will display the respective source code. Right-clicking on the same would show an option to ‘copy XPath’. It is as simple as that!
I would now suggest you to take a look at how to locate elements by XPath strategy by clicking here.
See you again in another post. Have a great day!