Eclipse setup for selenium – beginners
As mentioned in prevois post selenium webdriver setup, hope you downloaded the Eclipse IDE and all required jar files.
NOTE: Place the Eclipse IDE and jar files under a fixed folder location, do not change the folder path once you start writing the selenium tests.
If you are using Maven project to maintain your jar files, then follow here
For manually adding jar files to your project –
Follow below steps one by one :
Extract the zip / tar file to get the portable eclipse (no need to install).
Once you click on the eclipse.exe,
Set the workspace path, either you can chose the default or create own folder and copy paste the path for workspace.
NOTE: Workspace path is required to store all your projects and files.
Once Eclipse IDE is opened, click on the File -> New -> ‘Java Project’, and type project name(Let’s say MyProject),
leave all other options as it is and click on ‘Finish’
You will get the ‘MyProject’ just created, on the left side pane:
Right click on the ‘MyProject’, Click on New -> Package, Type ‘myPackage’ and click on ‘Finish’
Right click on the ‘myPackage’, Click on New -> Class, Type ‘testClass’ and check the checkbox as highlighted.
Click on the ‘Finish’ to get the below screen, can write code under the main() method:
Import required selenium jar files (Downloaded as per past blog “Selenium Client and Webdriver language bindings:”) by Right click on the ‘MyProject’ and click on ‘Java Build Path’
Navigate to the tab ‘Libraries’, click on the ‘Add External JARs…’ and add all the jar files.
To import any other .jar files later time, follow step 8.
Now you are in a good shape to write a simple selenium test using eclipse IDE with Java language.
Read selenium sample test in java
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 facebook:qavalidation.com, Thanks!