Skip to content

Instantly share code, notes, and snippets.

@diemol
Last active April 23, 2017 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diemol/df6f97b35c3943358a78d8200bbeae35 to your computer and use it in GitHub Desktop.
Save diemol/df6f97b35c3943358a78d8200bbeae35 to your computer and use it in GitHub Desktop.
Simple test case to reproduce #465 and #87 in SeleniumHQ/docker-selenium
public class TestCaseForIssue465 {
// Setting the url for the WebDriver
private static final String URL = "http://localhost:4444/wd/hub";
@Test
public void checkPageTitle() throws MalformedURLException {
for (int i = 0; i < 100; i++) {
System.out.println("Execution # " + i);
DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome();
desiredCapabilities.setCapability(CapabilityType.PLATFORM, Platform.LINUX);
// Create a new instance of the remote web driver
WebDriver driver = new RemoteWebDriver(new URL(URL), desiredCapabilities);
// Maximize the window
driver.manage().window().maximize();
// Go to Selenium Console
driver.get("http://localhost:4444/grid/console");
// Close the browser
driver.quit();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment