Skip to content

Instantly share code, notes, and snippets.

@muditlambda
Last active October 30, 2019 11:49
Show Gist options
  • Save muditlambda/1edaa72196f713d4fe0a8096e68ac15a to your computer and use it in GitHub Desktop.
Save muditlambda/1edaa72196f713d4fe0a8096e68ac15a to your computer and use it in GitHub Desktop.
// Registration with all valid data
@Test
public void validRegistrationTest(){
WebElement companyName = driver.findElement(By.name("organization_name"));
companyName.sendKeys("TestCompany");
WebElement fullName = driver.findElement(By.name("name"));
fullName.sendKeys("TestName");
WebElement email = driver.findElement(By.name("email"));
email.sendKeys("test6.lambdatest@gmail.com");
WebElement password = driver.findElement(By.name("password"));
password.sendKeys("Test@12345");
WebElement phone = driver.findElement(By.name("phone"));
phone.sendKeys("9876543210");
WebElement termsOfServices = driver.findElement(By.id("terms_of_service"));
termsOfServices.click();
WebElement signUp = driver.findElement(By.xpath("//button[contains(@class,'btn sign-up-btn-2 btn-block')]"));
signUp.click();
String expectedURL = "https://accounts.lambdatest.com/email/verify";
String actualURL = driver.getCurrentUrl();
Assert.assertEquals(actualURL, expectedURL);
String expectedTitle = "Verify Your Email Address - LambdaTest";
String actualTitle = driver.getTitle();
Assert.assertEquals(actualTitle, expectedTitle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment