@Override public boolean matchesSafely(S item) { return item.isActive().now(); }
public boolean shortcutHasAction(String description, String action) { return jsQueryFactory.forBooleanJavascript( "return AJS.$('.item-description:contains(\"" + description + "\")').siblings('.item-action').text() === '" + action + "'").now(); }
public boolean isVisible() { return isVisibleTimed().now(); }
public boolean isConfigured() { return isConfiguredTimed().now(); }
private void checkIsOpen(String windowName) { stateTrue("Window '" + windowName + "' is not open", isWindowOpen(windowName).now()); }
private void checkIsOpen() {stateTrue("Mentions dropdown must be open", isOpen().now());}
protected void assertDialogOpen() { assertTrue("Dialog is not open.", isOpen().now()); }
protected void assertDialogClosed() { assertFalse("Dialog is not closed.", isOpen().now()); }
public boolean isSlowComment() { return !getEditor().isQuickEdit().now() && driver.getCurrentUrl().contains("replyToComment="); } }
public boolean isSlowComment() { return !getEditor().isQuickEdit().now() && driver.getCurrentUrl().contains("&showCommentArea=true"); }
private String getDataAttribute(PageElement element, String attribute) { if (element != null && element.timed().isPresent().now()) { return element.getAttribute(attribute); } return null; }
@Override public void close() { if (isOpen().now()) { find(By.cssSelector("a.cancel")).click(); } }
/** * Closes the dialog by hitting ESC */ public void escape() { if(isOpen().now()) { locator.find(By.tagName("body")).type(Keys.ESCAPE); } }
public void collapseIfExpanded() { if (!isCollapsed().now()) { triggerKeyboardShortcut(); Poller.waitUntilTrue(isCollapsed()); } }
public void expandIfCollapsed() { if (isCollapsed().now()) { triggerKeyboardShortcut(); Poller.waitUntilFalse(isCollapsed()); } }
/** * Do a submit on the passed element. The method will then wait for the response from the server before returning. * * @param pageElement the page element to submit. * @return true if the dialog is still open. */ protected boolean submit(final PageElement pageElement) { assertDialogOpen(); pageElement.click(); waitWhileSubmitting(); return isOpen().now(); }
private static boolean isAt(EchoPage page, TestedProduct<WebDriverTester> product) { return product.getTester().getDriver().getCurrentUrl().startsWith(product.getProductInstance().getBaseUrl()) && page.isAt().now(); } }
/** * Close the dialog by clicking on the kindly ever-present cancel button. */ public void close() { if (isOpen().now()) { getDialogElement().find(By.className("cancel")).click(); } }
/** * Opens the popup and switches the focus to the popup's window * * @return this popup instance */ public PickerPopup<R> open() { if (!isOpen().now()) { parent.getTrigger().click(); Poller.waitUntilTrue(isOpen()); } switchToPopupWindow(); return this; }
public ViewIssuePage submit() { linkIssueDialog.clickLinkButton(); if (linkIssueDialog.isOpen().now() && locator.find(By.name("atl_token_retry_button")).isPresent()) { linkIssueDialog.submit(By.name("atl_token_retry_button")); } return linkIssueDialog.bindViewIssuePage(); }