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 :
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:
Enter the below code in the created java file:
1 2 3 4 5 6 7 8 9 10 11 12 |
import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class LoginTest { public static void main(String[] args) throws InterruptedException { WebDriver driver = new FirefoxDriver(); } } |
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
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