Last active
October 18, 2015 20:17
-
-
Save zdwolfe/7c339a1675a45f40d31f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@DataProvider(name = "searchBoxProvider") | |
public Object[][] searchBoxProvider() { | |
return new Object[][] { | |
{ "http://www.google.com", "lst-ib" }, | |
{ "https://duckduckgo.com", "search_form_input_homepage"}, | |
{ "https://www.dogpile.com/", "topSearchTextBox"}, | |
{ "http://www.bing.com", "sb_form_q"} | |
}; | |
} | |
@Test(dataProvider = "searchBoxProvider") | |
public void shouldHaveVisibleSearchBox(String url, String searchBoxId) { | |
WebDriver driver = new FirefoxDriver(); | |
driver.get(url); | |
WebElement searchBox = driver.findElement(By.id(searchBoxId)); | |
assertTrue(searchBox.isDisplayed()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment