Created
May 13, 2018 22:14
-
-
Save alpersilistre/a7d9ca63e4661edf13f2e41e3cb732d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package automationFramwork; | |
import java.util.concurrent.TimeUnit; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
public class RegistrationTestCase { | |
public static void main(String[] args) { | |
System.setProperty("webdriver.chrome.driver", "C:\\Users\\Alper Silistre\\Downloads\\ChromeDriver\\chromedriver.exe"); | |
WebDriver driver = new ChromeDriver(); | |
WebElement element = null; | |
String baseUrl = "https://www.alpersilistre.com/RegistrationForm/"; | |
driver.get(baseUrl); | |
driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); | |
element = driver.findElement(By.id("name")); | |
element.sendKeys("Test Name"); | |
driver.manage().timeouts().implicitlyWait(2000, TimeUnit.MILLISECONDS); | |
element = driver.findElement(By.id("mail")); | |
element.sendKeys("[email protected]"); | |
driver.manage().timeouts().implicitlyWait(2000, TimeUnit.MILLISECONDS); | |
element = driver.findElement(By.id("password")); | |
element.sendKeys("password123"); | |
driver.manage().timeouts().implicitlyWait(2000, TimeUnit.MILLISECONDS); | |
element = driver.findElement(By.id("over_13")); | |
element.click(); | |
element = driver.findElement(By.id("bio")); | |
element.sendKeys("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard " | |
+ "dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " | |
+ "It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged"); | |
driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment