To configure the selenium on your system, follow the below given steps-

  • Java should be installed on your system.

Java

Eclipse

Eclipse1

  • Create a java project.

JavaEE

  • Select Java Project > Click on Next button > Enter Gmail in Project Name edit field. > Click on Next button > Click on Finish button.

Eclipse2

  • Now configure the Selenium WebDriver API with your Gmail project.
  • Select the Gmail project and right click > Select Build Path > Click on Configure Build Path…>Click on Add External JARs… button > Browse the extracted Selenium folder and include all Executable Jar file > Click on OK button.

Project

  • Now selenium is configured with your java project.
  • Create a Login class.

Class

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class Login {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

WebDriver browser;

browser = new InternetExplorerDriver ();

browser.get(“http://www.gmail.com”);

}

}

Script

  • Press ctrl+f11.
  • Now you are ready to write your own code to automate your web application.
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s