示例#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");
   }
 }
示例#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());
 }
 public void completed(ProgressEvent event) {
   setDone(true);
   browser.getSWTWidget().removeProgressListener(this);
 }