예제 #1
0
 public void setTargetFromWidget() {
   String targetId = Utils.<String>getComponentOption(getRootElement(), "target").orNull();
   if (targetId != null) {
     target = browser.findElement(By.id(targetId));
   } else {
     target = getRootElement();
   }
 }
예제 #2
0
 /**
  * Dismisses currently displayed popup menu. If no popup menu is currently displayed an
  * exception is thrown.
  *
  * @throws IllegalStateException when no popup menu is displayed in the time of invoking
  */
 public void hide() {
   if (!getMenuPopup().isDisplayed()) {
     throw new IllegalStateException(
         "You are attemting to dismiss the "
             + getNameOfFragment()
             + ", however, no "
             + getNameOfFragment()
             + " is displayed at the moment!");
   }
   Utils.performUniversalBlur(browser);
   waitUntilIsNotVisible().perform();
 }
 public void testJointPoint() {
   updateDropDownMenuInvoker();
   getCurrentMenu().advanced().show(page.getTarget1());
   Locations l = Utils.getLocations(page.getFileMenu());
   testJointPoint(
       l.getWidth(),
       l.getHeight(),
       new ShowElementAndReturnAction() {
         @Override
         public WebElement perform() {
           getCurrentMenu().advanced().show(page.getTarget1());
           return getCurrentMenu().advanced().getMenuPopup();
         }
       });
 }
 @Test
 @Templates("plain")
 @UseWithField(field = "positioning", valuesFrom = FROM_ENUM, value = "")
 public void testJointPoint() {
   Locations l = Utils.getLocations(popupCalendar.getRootElement());
   testJointPoint(
       l.getWidth(),
       l.getHeight(),
       new ShowElementAndReturnAction() {
         @Override
         public WebElement perform() {
           return popupCalendar.openPopup().getRoot();
         }
       });
 }
예제 #5
0
 @Test(groups = "smoke")
 @Templates("plain")
 @RegressionTest("https://issues.jboss.org/browse/RF-10218")
 @UseWithField(field = "positioning", valuesFrom = FROM_ENUM, value = "")
 public void testJointPoint() {
   openMenu();
   Locations l = Utils.getLocations(group);
   testJointPoint(
       l.getWidth(),
       l.getHeight(),
       new ShowElementAndReturnAction() {
         @Override
         public WebElement perform() {
           openMenuAndSubMenu();
           return groupList;
         }
       });
 }
예제 #6
0
 @Override
 public boolean isVisible() {
   return Utils.isVisible(getMenuPopup());
 }
예제 #7
0
 public long getTimeoutForPopupMenuToBeVisible() {
   return _timeoutForPopupMenuToBeVisible == -1
       ? Utils.getWaitAjaxDefaultTimeout(browser)
       : _timeoutForPopupMenuToBeVisible;
 }
예제 #8
0
 public void setShowEventFromWidget() {
   Optional<String> event = Utils.getComponentOption(root, "showEvent");
   setShowEvent(new Event(event.or(getDefaultShowEvent().getEventName())));
 }
예제 #9
0
 /**
  * Asserts that elements locations and some other locations are equal with some allowed tolerance.
  */
 public static void tolerantAssertLocationsEquals(
     WebElement element, Locations l2, int xTolerance, int yTolerance, String message) {
   tolerantAssertLocationsEquals(Utils.getLocations(element), l2, xTolerance, yTolerance, message);
 }
 @Override
 protected GrapheneElement getBodyElement() {
   return (Utils.isVisible(bodyElement) ? bodyElement : emptyBodyElement);
 }
 public long getTimeoutForPanelIsSwitched() {
   return _timeoutForPanelIsSwitched == -1
       ? Utils.getWaitAjaxDefaultTimeout(browser)
       : _timeoutForPanelIsSwitched;
 }
예제 #12
0
 public long getTimeoutForNodeToBeSelected() {
   return _timeoutForNodeToBeSelected == -1
       ? Utils.getWaitAjaxDefaultTimeout(driver)
       : _timeoutForNodeToBeSelected;
 }
 public boolean isNoData() {
   return Utils.isVisible(noDataElement);
 }