Created
May 26, 2021 19:02
-
-
Save Jaimin180296/ce902803fe7cc61cacaa6713b6ac6861 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
driver.get("https://www-am-uat1-global-vuse.non-prod.marketing.bat.net/co/es/customer/account/create/"); | |
WebDriverWait wait; | |
wait = new WebDriverWait(driver, 30); | |
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[text()='Aceptar todas las cookies']"))).click(); | |
Select objSelect = new Select(driver.findElement(By.id("age-gate-dob-day"))); | |
objSelect.selectByIndex(4); | |
Select objSelect1 = new Select(driver.findElement(By.id("age-gate-dob-month"))); | |
objSelect1.selectByIndex(4); | |
Select object2 = new Select(driver.findElement(By.id("age-gate-dob-year"))); | |
object2.selectByIndex(20); | |
driver.findElement(By.xpath("//button[@class='action allow secondary']")).click(); | |
Thread.sleep(5000); | |
WebElement click = driver.findElement(By.xpath("//button[@type='submit' and @class='action submit primary']")); | |
JavascriptExecutor executor = (JavascriptExecutor) driver; | |
executor.executeScript("arguments[0].scrollIntoView(true);", click); | |
executor.executeScript("arguments[0].click();", click); | |
Thread.sleep(5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment