package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
public class GmailAccountCreation {
public WebDriver driver;
String str="//div[@class='goog-inline-block goog-flat-menu-button jfk-select']";
@Test
public void gmail() throws Exception {
// driver.findElement(By.linkText("Add account")).click();
driver.findElement(By.linkText("Create account")).click();
Thread.sleep(2000);
driver.findElement(By.id("FirstName")).sendKeys("siva");
driver.findElement(By.id("LastName")).sendKeys("kumar");
driver.findElement(By.id("GmailAddress")).sendKeys("a9108650323");
driver.findElement(By.id("Passwd")).sendKeys("
9108650323");
driver.findElement(By.id("PasswdAgain")).sendKeys("
9108650323");
driver.findElement(By.xpath(str)).click();
driver.findElement(By.xpath("//div[@class='goog-menuitem-content' and contains (text(),'April')]")).click();
driver.findElement(By.id("BirthDay")).sendKeys("12");
driver.findElement(By.id("BirthYear")).sendKeys("1992");
driver.findElement(By.xpath("/html/body/div[1]/div[2]/div/div[1]/div/form/div[6]/label/div/div")).click();
Thread.sleep(7000);
driver.findElement(By.xpath("//div[@class='goog-menuitem-content' and contains (text(),'Male')]")).click();
driver.findElement(By.xpath("//div[@class='goog-inline-block i18n-phone-select-country-dropdown']")).click();
driver.findElement(By.xpath("//div[@class='i18n-phone-flag']")).click();
driver.findElement(By.id("RecoveryPhoneNumber")).sendKeys("
9108650323");
driver.findElement(By.id("SkipCaptcha")).click();
driver.findElement(By.id(":h")).click();
driver.findElement(By.xpath("//div[@class='goog-menuitem-content' and contains (text(),'India (भारत)')]")).click();
driver.findElement(By.id("TermsOfService")).click();
}
@BeforeTest
public void beforeTest() {
driver=new FirefoxDriver();
driver.manage().window().maximize();
}
}