Thursday, September 4, 2014

Selenium Automation Framework


Selenium automation framework:

1.First Need to install Java in your machine. JDK any version above v1.5 .

2. Need to install Maven in Eclipse .

A. How to install Maven into Eclipse.

   --> Open the browser and navigate to Maven website.

link : http://download.eclipse.org/technology/m2e/releases
Copy the Above URL and open the Eclipse-> Help-> install new Soft wares-> paste the Url as mentioned below.


click on -> Next button-> Next-> Accept -> finsih it.

Once installation is done then restart the Eclipse automatically.


   Once Eclipse is restarted then we need to create a Maven Project.


B. How to create  a Maven Project.

Steps:

Eclipse:
 Open File menu-> New-> Others(last option).-> Search for Maven


click on Other-> search Maven-> Enter


Select the check box: Create a simple project-> click on Next button.

Then enter the GroupId and Artifact ID:

ArtifactId is nothing but Projectname: and click on Fins
h button



Once Project is created just Double click on Project.

You can see the below structure.




now its time to talk about each feature in Maven Project.



1. src/test/java: here we need to create Test scripts means java classes.

ex: create a package in that need to create java class: Sample.java

2. src/test/resources : here we have to place all the

a. Properties file
b. Test Data file
c. TestNg.xml file


3. pom.xml : this is the key of Maven Project. without this we cant run maven.


Now we need to download  apache-maven- from


once you download this file from apache maven  weebsite. please place in C drive and extract there itself.



then we need to set Environmental variables for Java and Maven:








Once we finish with above configuration we need to check whether Maven version is showing in command prompt or not.

Go to run command and enter cmd.

and type mvn -v


No comments:

Post a Comment

TestNG - Can i use the 2 different data providers to same @test methods in TestNG?

public Object [][] dp1 () { return new Object [][] { new Object [] { "a" , "b" }, new Obje...