Vous êtes sur la page 1sur 2

package porject;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class GmailProject {

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("https://accounts.google.com/signup/v2/webcreateaccount?
hl=en&flowName=GlifWebSignIn&flowEntry=SignUp");
driver.manage().window().maximize();

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

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

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

driver.findElement(By.xpath(".//*[@id='passwd']/div[1]/div/div[1]/input")).sendKeys
("zain077@123");
driver.findElement(By.xpath(".//*[@id='confirm-
passwd']/div[1]/div/div[1]/input")).sendKeys("zain077@123");

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

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

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

Thread.sleep(50000);

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

Thread.sleep(50000);
//driver.findElement(By.xpath(".//*[@id='view_container']/form/div[2]/d
iv/div[2]/div/div[1]/div/div[1]/input")).sendKeys("zainabshakky@gmail.com");
Select month= new
Select(driver.findElement(By.xpath(".//*[@id='month']")));
month.selectByIndex(6);
driver.findElement(By.xpath(".//*[@id='day']")).sendKeys("7");
driver.findElement(By.xpath(".//*[@id='year']")).sendKeys("1995");
Select gender= new
Select(driver.findElement(By.xpath(".//*[@id='gender']")));
gender.selectByVisibleText("Female");

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

Thread.sleep(10000);

driver.findElement(By.xpath(".//*[@id='view_container']/form/div[2]/div/div/div/div
[1]/div/div")).click();

driver.findElement(By.xpath(".//*[@id='view_container']/form/div[2]/div/div/div/div
[1]/div/div")).click();

driver.findElement(By.xpath(".//*[@id='view_container']/form/div[2]/div/div/div/div
[1]/div/div")).click();

driver.findElement(By.xpath(".//*[@id='view_container']/form/div[2]/div/div/div/div
[1]/div/div")).click();

Thread.sleep(20000);

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

Vous aimerez peut-être aussi