Steps for creating a project in Eclipse

The steps for creating a project in Eclipse for the Automation Testing using Selenium are given below:

  • Create a project by navigating to File >> New >> Select project.
  • Select the Java Project
  • Steps for creating a project in Eclipse
  • Give the project name ‘Selenium or any name’.
  • Select 1.6/1.7/1.8 from dropdown Use an execution environment JRE then click on finish.
  • Click on Yes to continue the setup

Steps for creating a project in Eclipse

  • Expand the Selenium Automation Project
  • Right click on JRE system library
  • Click on Build path and select Configure build path.

Steps for creating a project in Eclipse

  • Click on Add External JARs – select selenium server standalone jar file from library folder then click on ‘Open’ and ‘Ok’.
  • Steps for creating a project in Eclipse
  • Go to ‘Run’ click an ‘External Tools’ and select ‘External Tools Configurations’.
  • Steps for creating a project in Eclipse
  • Double click on the program.
  • Click on ‘browser file system’ then select ‘Java.exe’ from the following path

C\program files\java\jre8\bin\java.exe

  • Click on ‘browse file system‘ in the working directory and select ‘library folder’.

D:\Library

  • It should contain the selenium server standalone jar file.
  • Give the ‘Argument’ as “–jar selenium–server–standalone–2.48.0 jar”.
  • Click on ‘Apply’ and then ‘Run’.

Steps for creating a project in Eclipse

Note: By default, selenium will run on the part ‘4444’. If required we can change part number also.

Package:

  • Package is nothing but the folder where it contains classes.
  • It will be available in the SRC folder of the project.

Class:

  • A class is a blue print or template, it contains objects.
  • An object can be anything which should physically available.
  • In Java, the object is nothing but ‘datatype, method, instances’.

Public Static Void main:

  • It is the main method which is responsible for execution.
  • To take the elements, locators or targets, we have the below add-on’s for the browser.

 

Browser                                                                    Addons

Firefox                                                            fire bug and inspect element(q)

IE                                                                   developer tools

Google chrome                                             inspect element

Safari                                                            inspect element

Opera                                                           inspect element

 

Please click here to read Selenium Configuration with Java

Please click here to read Selenium Components

Please click here to read Selenium IDE

Please click here to read Advantages and limitations of Selenium IDE

Leave a Comment