Integrating WebDriver JavaDocs in Eclipse


INTRODUCTION :

Hello there,all you budding QA Automation Engineers!!As you all must be working with Selenium Webdriver in most of your projects to ease your Manual Testing efforts, let me share with you a great trick which can help you to understand or probably work as an info assistant for all your WebDriver API’s.We all use Selenium Java Docs for referring  to all the common Webdriver commands such as :

  • GetText
  • GetTitle
  • FindsByXpath
  • WebDriverWait
  • WebElement

To understand the functionality of these commands you have to always keep on referring to this Selenium Java Doc.Now this will obviously increase your development efforts considering you have to always switch back and forth to refer to it.

HOLD ON, WE HAVE A SOLUTION FOR YOU 🙂 !!!!

You can integrate the Selenium Java Doc in your eclipse editor.You need to have the below prerequisites installed on your machine to do it.

PREREQUISITES:

Open your Eclipse Editor and follow the below steps:

  • Right Click on Project Explorer > Click on New > Java Project

  • Enter the ProjectName > Click on Finish
  • Right Click on the Project > Click on New Class

  • Enter the name without any spaces
  • Select Which Method stubs you would like to create ?
  • Click on Finish

Enter the below code in the created java file:

Hover the mouse to the FireFoxdriver object.Editor shows something like below :

Which means that you cannot find the source of the FirefoxDriver.In order to achieve this, go to the Eclipse Editor

  • Right click on your project > Click on Properties > Java Build Path > Libraries
  • Click on your selenium-server-standalone-2.53.0.jar and Expand it
  • Select Javadoc Location option and click on Edit

Something like the following will appear :

In the Javadoc locationpath enter the url http://seleniumhq.github.io/selenium/docs/api/java/

Click on Validate.It will display some message like :

Click on ok.Now again hover the mouse to the FiredoxDriver object.It should displays something like belo

Thats it , you got it working now.
Cheers
Happy Testing !!

Leave a Reply

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