Automation Setup using Selenium

What is Selenium?

Selenium is an open source automation tool for testing Web applications across multiple Browsers and Platforms.

Why must Selenium be preferred?

Advantage : –

  • Open Source
  • Supports Multiple Languages (Java, PHP, Python etc)
  • Supports different Browsers ( Firefox, Chrome, IE, Safari, Opera)
  • Supports different Operating System (Window, Mac, Linux)
  • It is flexible and Extendable.

Installation of Eclipse and Configure WebDriver (Windows/Linux)

For Windows/Linux –

  1. Install Firefox Browser ( Version :- 42.0)
  2. Install Java. (Version :- jdk1.8.0_40)
  3. Download Eclipse IDE for Windows/Linux
    Source:- https://www.eclipse.org/downloads/packages/release/Kepler/SR2
  4. Start the Eclipse.
  5. Go to File → New → Java Project.
  6. Right Click on Java Project which is created in above step → Select Build Path → Configure Build Path.
  7. Right Click on src → New → Package.
  8. To create a Class :- Right Click on Package Name → New → Class.

Installing Maven into Eclipse

Maven is a powerful project management tool that is based on POM (project object model).

It is used for project build, manages required dependencies from Eclipse workspace without installing to local Maven repository.

  1. Click on Help → Install New Software
  2. Enter
    Name: m2e
    Location: http://download.eclipse.org/technology/m2e/releases
  3. Then, Click on Next

Installing Maven into Eclipse

4. Accept the Review Licenses.

Accept the Review Licenses

 Install Maven Independently

  1. Now, Install Maven Independently.
  2. Download Maven from URL :-  http://maven.apache.org/Download Maven


7.  After the Maven is downloaded completely, Extract and save the zip file.

Extract and save the zip file

8. Next step is declaration an environmental variable to maven.

9. Below are the environmental variable that need to be declare.

JAVA_HOME = C:\Program Files (x86)\Java\jdk1.7.0_76

M2_HOME = E:\Eclipse\apache-maven-3.3.3

M2 = %M2_HOME%\bin

Path = ;E:\Eclipse\apache-maven-3.3.3\bin\

10. Right click on My Computer → Click on Properties → Click on Advanced system settings.

 Click on Advanced system settings

11. Click on Environment Variables.
Click on Environment Variables

12. Click on New → Add JAVA_HOME, M2 and M2_HOME
Click on New → Add JAVA_HOME

13. Select Path → Click on Path → Click on Edit and append to the value of the Path environmental variable as E:\Eclipse\apache-maven-3.3.3\bin\
Select Path

14. Open a command window and type the command:

  • mvn –version

Open a command window

15. Creating pom.xml → Right Click on Project Name → select Configure -> Convert to Maven Project.
Creating pom.xml

Commands used  :-

  • mvn eclipse:clean – Download all the jars/ required field declared in POM.xml of project
  • mvn eclipse:eclipse – Create a path file for eclipse to add the build path.

The Maven installation into Eclipse is completed.

You might also like