Google+

WebDriver Element Locator Firefox add-on for generating Selenium Code along with XPath locators

WebDriver Element Locator is a Firefox plugin.

Purpose of this Plug-in

The purpose of this plugin is not only to generate XPath locators for the Web Elements which are displayed on the page, but also to generate WebDriver script in desired programming languages.

Advantages of this Plug-in

Speed up the writing of Selenium WebDriver Web Element locating scripts and easing the process of locating Web Elements on Web Pages.




Alternatives for  'WebDriver Element Locator' plug-in

The below are the alternatives:
  • Inbuilt inspectors in different Browsers
  • FireBug Firefox Add-on
  • FirePath Firefox Add-on
Now, we can also use WebDriver Element Locator Firefox Add-on, along with the above alternative add-ons. 

How WebDriver Element Locator Firefox Add-on is different from its alternative add-ons FireBug and FirePath
  • Creates better XPaths than FireBug & FirePath Add-ons
  • Generates WebDriver code for that located XPath locator to speed up the process of writing Selenium Automation code. This feature is not available in FireBug & FirePath Add-ons.
  • Generates only XPath locators. Other locators like CSS Selectors wont be generated using this Add-on. Where as FireBug & FirePath Add-ons together can generate CSS Selectors also.
Hence we cannot ignore any add-on out of FireBug, FirePath and WebDriver Element Locator Add-ons.

Thats all about the theoretical stuff !

Now, I will explain the below two things one after the another:
  • Installing WebDriver Element Locator Firefox Add-on
  • Using WebDriver Element Locator Firefox Add-on
Installing WebDriver Element Locator Firefox Add-on

The below are the steps for installing WebDriver Element Locator Firefox Add-on:

Prerequisites:

Downgrade to older version of Firefox say 47.0.1. Before downgrading stop the auto downgrades from Tools > Options of firefox. After setting this option, install the older version of Firefox i.e. 47.0.1 from http://www.filehippo.com 

Reason: FireBug, Firepath , Selenium IDE and WebDriver Element locator add-ons wont work from 55 version of Firefox. Hence install older version of Firefox when you need these add-ons.

Steps:

1. Launch Firefox Browser and Google.com as shown below:





















2. Google Search with "WebDriver Element Locator Firefox Addon" text and click on the below shown Google search result:






















3. Click "Continue to Download" button on the "WebDriver Element Locator" Firefox Add-on page as shown below:























4. Click on 'Add to Firefox' button as shown below:




















5. Click on 'Install' as shown below:























6.Click on 'OK' button as shown below:
















Using WebDriver Element Locator Firefox Add-on

The below are the steps for using WebDriver Element Locator Firefox Add-on:

1. Launch Firefox Browser and browse any application URL say www.omayo.blogspot.com as shown below:






























2. Right click on any Web element say 'Home' and observe that additional options related to 'WebDriver Element Locator' Firefox add-on are displayed on right click menu as shown below:



























3. As I am automating in Selenium using Java programming language, I have to select 'Java Locators' option and select the best of the suggested WebDriver code containing XPath locators as shown below:





























4. Open any editor say 'NotePad' and select to paste as shown below:



























5. Observe that XPath locator along with the Selenium WebDriver code in Java got pasted into the NotePad editor as shown below:












Conclusion

Hence, this add-on not only suggests the best XPath locator, but also generates the Selenium WebDriver code in selected programming language to speedup the process of writing the Selenium Code.

4 comments:

Unknown said...

Great, Thanks for shaaring

Arun Motoori said...

Thanks for your feedback :)

Elevator Consultancy said...

This plugin is not compatible with the newer versions of Firefox. As when I try to download the plugin, I am getting message as 'Not compatible with Firefox Quantum'

Arun Motoori said...

@Elevator - Downgrade to older version of Firefox say 47.0.1. Before downgrading stop the auto downgrades from Tools > Options of firefox. After setting this option, install the older version of Firefox i.e. 47.0.1 from http://www.filehippo.com

Reason: FireBug, Firepath , Selenium IDE and WebDriver Element locator add-ons wont work from 55 version of Firefox. Hence install older version of Firefox when you need these add-ons.