Introduction To Selenium

Posted By : Nitin Kumar | 27-Jun-2018

          

Selenium is an open source(free) automation testing suite for web applications crosswise over various platform and browser. It is very like HP Quick Test Pro (QTP now UFT but only the main difference is that selenium is used for web application. Testing using selenium framework is called selenium testing. Selenium is not just a tool it is set of tool called a suit. It helps the testers to perform the testing of web application efficiently.

 

It has four parts:

a)Selenium IDE

b)Selenium RC

c) Selenium webdriver

d)Selenium grid

 

a)Selenium IDE: It is Selenium integrated environment. It is a Firefox plugin. It helps the testers to record their action which they perform to test the certain flow.

b)Selenium Remote Control (RC) was the lead testing framework that permitted more than straightforward program activities and direct execution. It makes full utilization of all programming language.

c)Selenium web driver: It is at the top of selenium grid which sends the command directly to the browser and retrieves the result.

d)Selenium grid: It is a tool which helps in running parallel test over different machine and browser which help in reducing execution speed.

 

Advantages of selenium:

1. It is an open source tool.

2. Its also support mobile application

3. It can be used on multiple browser and multiple platforms


 

How to download and install selenium web driver:

1.Download Java

2.Download Eclipse

3.Download selenium from its official website “www.seleniumhq.org

 
A simple code in java for login using selenium
 
import java.sql.Driver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;


import org.testng.annotations.Test;


public class login {

    public static void main(String[] args)
    {


         System.setProperty("webdriver.gecko.driver","/home/nitinkumar/DurgaSoft/geckodriver");
         System.setProperty("webdriver.Firefox.driver", "/home/nitinkumar/Downloads/Nitin kr/Downloads/firefox");
         WebDriver driver=new FirefoxDriver();
         driver.get("http://localhost:4200");
         driver.findElement(By.name("email")).sendKeys("Enter email id");
         driver.findElement(By.name("password")).sendKeys("Enter password");

         driver.findElement(By.xpath("//button[@class='btn btn-default changepassword-btn'][1]")).click();


}

}

 By using selenium you can create the script for all the functionality. One thing which is important you should have the basic knowledge of java.Wcan use automation script only when we need to test correct functionality.for every test case you need to do manual testing. Automation testing secure the time of executing positive test cases.

Related Tags

About Author

Author Image
Nitin Kumar

Nitin is a QA Engineer. He is adaptive and passionate to learn new technical skills.

Request for Proposal

Name is required

Comment is required

Sending message..