Skip to content

Instantly share code, notes, and snippets.

@fwielstra
Created May 16, 2011 09:16
Show Gist options
  • Save fwielstra/974131 to your computer and use it in GitHub Desktop.
Save fwielstra/974131 to your computer and use it in GitHub Desktop.
A Selenium WebRunner test using multiple WebRunners
@Test
public void runSomeIntegrationTest() {
for (Supplier<WebDriver> supplier : WebDriverSupplier.getWebDrivers()) {
WebDriver driver = supplier.get();
Selenium selenium = new WebDriverBackedSelenium(driver, SharedConfiguration.BASE_URL);
selenium.open("page.html");
SeleniumUtils.waitForElementPresent(selenium, "xpath=//tr[@id='task-TASK_001']");
SeleniumUtils.clickElement(driver, By.linkText("1001"));
SeleniumUtils.waitForElementPresent(selenium, "xpath=//tr[@id='wo-1001']");
assertEquals("CANCELLED", selenium.getText("xpath=//tr[@id='wo-1001']/td[3]"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment