You are on page 1of 1

package porject;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class LogIn {

public static void main(String[] args) throws InterruptedException {


// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver", "C://Selenium/geckodriver-
v0.20.1-win64/geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(1000, TimeUnit.SECONDS);

driver.get("http://www.gmail.com");
driver.manage().window().maximize();

driver.findElement(By.xpath(".//*[@id='identifierId']")).sendKeys("zainshakkyy");

driver.findElement(By.xpath(".//*[@id='identifierNext']/content/span")).click();

Thread.sleep(20000);

driver.findElement(By.xpath(".//*[@id='password']/div[1]/div/div[1]/input")).sendKe
ys("zain077@123");

driver.findElement(By.xpath(".//*[@id='passwordNext']/content/span")).click();

Thread.sleep(10000);
driver.findElement(By.xpath(".//*[@id=':3n']/div/div")).click();

Thread.sleep(5000);

driver.findElement(By.xpath(".//*[@id=':93']")).sendKeys("testautomation.mar28.2K18
@gmail.com");
Thread.sleep(5000);
driver.findElement(By.xpath(".//*[@id=':8l']")).sendKeys("Employee
Name: Zainab Shakkarwala, Employee ID: 06771Y");
Thread.sleep(5000);
driver.findElement(By.xpath(".//*[@id=':9q']")).sendKeys("Employee
Name: Zainab Shakkarwala, Employee ID: 06771Y");
Thread.sleep(5000);
driver.findElement(By.xpath(".//*[@id=':8b']")).click();
}

You might also like