Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- waitforelementpresent(locator.login_email);
- click(locator.login_email);
- type(locator.login_email,email);
- click(locator.login_password);
- type(locator.login_password,password);
- Thread.sleep(5000);
- click(locator.login_button); //This button I need to click
- public static void click(By by) {
- WebDriverWait wait = new WebDriverWait(driver, defaultWaitPeriod);
- wait.until(ExpectedConditions.elementToBeClickable(by));
- driver.findElement(by).click();
- }
- public static void type(By by, String type) {
- WebDriverWait wait = new WebDriverWait(driver, defaultWaitPeriod);
- wait.until(ExpectedConditions.visibilityOfElementLocated(by));
- driver.findElement(by).clear();
- driver.findElement(by).sendKeys(type);
- public By login_email=By.xpath("//input[@placeholder='Email ']");
- public By login_password=By.xpath("//input[@placeholder='Password ']");
- public By login_button=By.xpath("//form[@class='m-t ng-dirty ng-valid-email ng-valid-parse ng-valid ng-valid-required']//button");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement