コード例 #1
0
 @Test
 @Ignore("Not passing from the command line")
 public void webDriverTimesOut() throws InterruptedException, MalformedURLException {
   String url = hub.getConsoleURL().toString();
   DesiredCapabilities caps = GridTestHelper.getDefaultBrowserCapability();
   WebDriver driver = new RemoteWebDriver(hub.getWebDriverHubRequestURL(), caps);
   driver.get(url);
   assertEquals(driver.getTitle(), "Grid Console");
   wait.until(
       new Function<Object, Integer>() {
         @Override
         public Integer apply(Object input) {
           Integer i = hub.getRegistry().getActiveSessions().size();
           if (i != 0) {
             return null;
           }
           return i;
         }
       });
   assertEquals(hub.getRegistry().getActiveSessions().size(), 0);
 }