Skip to content

Instantly share code, notes, and snippets.

@fwielstra
Created May 16, 2011 09:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fwielstra/974161 to your computer and use it in GitHub Desktop.
Workaround for clicking elements from a WebDriver test in Internet Explorer
public static void clickElement(WebDriver driver, By condition) {
WebElement sbutton = driver.findElement(condition);
sbutton.sendKeys("\n");
try {
sbutton = driver.findElement(condition);
sbutton.click();
} catch (NoSuchElementException e) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment