Skip to content

Instantly share code, notes, and snippets.

@ultimate-qa2
Last active March 28, 2021 15:30
Show Gist options
  • Save ultimate-qa2/5e78c64f6d09fdaeccb1f52b6a2cc564 to your computer and use it in GitHub Desktop.
Save ultimate-qa2/5e78c64f6d09fdaeccb1f52b6a2cc564 to your computer and use it in GitHub Desktop.
@Test
public void enabledElements() throws InterruptedException {
driver.get("https://the-internet.herokuapp.com/dynamic_controls");
WebElement textField = driver.findElement(By.xpath("//input[@type='text']"));
Assert.assertTrue(!textField.isEnabled());
driver.findElement(By.xpath("//button[@onclick='swapInput()']")).click();
Thread.sleep(5000);
Assert.assertTrue(textField.isEnabled());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment