Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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