Exemplo n.º 1
0
 @Test
 public void testInternalBrowser() {
   try {
     Browser b = new InternalBrowser();
     b.setURL("http://www.google.com");
     final int limit = 100; // 100 cycles maximum
     int counter = 0;
     while (!b.isPageLoaded() && counter < limit) {
       counter++;
       AbstractWait.sleep(100);
     }
   } catch (SWTLayerException e) {
     fail("Browser should be available");
   }
 }
Exemplo n.º 2
0
 /**
  * See {@link Browser}
  *
  * @param browser
  * @return
  */
 public static String getText(final Browser browser) {
   new WaitUntil(new PageIsLoaded(browser));
   return WidgetHandler.getInstance().getText(browser.getSWTWidget());
 }
Exemplo n.º 3
0
 public void completed(ProgressEvent event) {
   setDone(true);
   browser.getSWTWidget().removeProgressListener(this);
 }