Created
June 16, 2020 10:33
-
-
Save diemol/a948c6dee6f884446f5bc7d045ff3ebf to your computer and use it in GitHub Desktop.
SimpleChromeTest
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
public void simpleChromeTest() throws MalformedURLException { | |
URL gridUrl = new URL("http://localhost:4444/wd/hub"); | |
RemoteWebDriver webDriver = new RemoteWebDriver(gridUrl, new ChromeOptions()); | |
webDriver.get("http://www.google.com/ncr"); | |
webDriver.findElement(By.name("q")).sendKeys("webdriver", Keys.RETURN); | |
WebDriverWait webDriverWait = new WebDriverWait(webDriver, Duration.ofSeconds(5)); | |
webDriverWait.until(ExpectedConditions.titleContains("webdriver")); | |
webDriver.quit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment