Last active
October 18, 2015 20:22
-
-
Save zdwolfe/d7acf01ccbccdf9db5d3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
interface SearchEngine { | |
static void preparePage(WebDriver driver); | |
} | |
class DefaultSearchEngine implements SearchEngine { | |
static void preparePage(WebDriver driver) { | |
// do nothing | |
} | |
} | |
class DuckDuckGo implements SearchEngine { | |
static void preparePage(WebDriver driver) { | |
WebElement adCloseButton = driver.findElement(By.id('mainAdCloseButton')); | |
adCloseButton.click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment