Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Wait until the expiration dropdown is visible
- WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
- WebElement expirationDropdown = wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("select2-selection__rendered")));
- // Click to open the dropdown
- expirationDropdown.click();
- // Select option by visible text
- WebElement tenMinutesOption = driver.findElement(By.xpath("//li[text()='10 Minutes']"));
- tenMinutesOption.click();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement