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
It has four parts:
a)Selenium IDE
b)Selenium RC
c) Selenium webdriver
d)Selenium grid
a)Selenium IDE: It is S
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”
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
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Nitin Kumar
Nitin is a QA Engineer. He is adaptive and passionate to learn new technical skills.