Firefox addons to identify web elements for Selenium

To view the HTML content and spy on an webelement, there are different ways for different browsers, mostly people use firefox browser to identify the web elements as it has more number of addons for web element identification.

1) Firebug – 

Once firebug is installed, you will see a bug icon on the right top corner of the browser, click as per the below screen order to identify the webelements.

2) firepath

will get this with the firebug addon: which displays the relative or absolute xpath of a web element as shown below:

Above xpath is known as Relative xpath, it takes the recent (parent element id) and then move downwards to identify the required webelement, if anything changes on the browser elements above to this required web element doesn’t affect our xpath.
But if we use Absolute xpath which starts from the root node of the html and moves downwards to the required web element which depends on the inter relation among all the web elements on the browser, so if anything gets change, we need to change our xpath as well, let’s see one example:

Another way to get the firepath directly is to, right click on any web element and then click on the options as shown below instead of clicking on the bug icon on right top corner of browser:

3) xpath checker –

Another addon to mozilla to identify the xpath as shown below,
Just right click on any browser element and click on the xpath… option.

4) WebDriver Element Locator – 
Right click on any web element and click on the java locatiors… option to get the xpath.
For Chrome browser addon, refer Chrome addon for selenium.

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *