/** * @return timed condition that returns true if the applinks list is empty (there is no applinks) */ @Nonnull public TimedCondition isEmpty() { return applinksTable.withTimeout(TimeoutType.PAGE_LOAD).timed().hasAttribute("data-empty", "empty"); }
/** * @return timed condition to wait for the switch back to V2 to be present * @see ListApplicationLinkPage#switchToV3Ui() */ @Nonnull public TimedCondition hasSwitchBack() { return switchBack.withTimeout(TimeoutType.PAGE_LOAD).timed().isPresent(); }
@Nonnull public TimedCondition isStatusLoaded() { return getStatusContainer() .withTimeout(TimeoutType.SLOW_PAGE_LOAD) .timed() .hasAttribute("data-status-loaded", Boolean.TRUE.toString()); }
public AdvancedSearch acknowledge() { acknowledgeButton.withTimeout(TimeoutType.SLOW_PAGE_LOAD).click(); return pageBinder.bind(AdvancedSearch.class); }
/** * NOTE: this method only checks whether the sync is in progress, use {@link #isSynchronizationFinished()} for a * reliable answer as to whether the synchronization has <i>finished</i>. * * @return {@code true}, if synchronization is currently in progress. */ @Nonnull public TimedCondition isSyncing() { return getSynchronizationIcon().withTimeout(SLOW_PAGE_LOAD).timed().hasClass("running"); }
public TimedCondition isAddGlobalPermissionWarningPresent() { return elementFinder.find(By.id("default-groups-warning")).withTimeout(TimeoutType.AJAX_ACTION).timed().isVisible(); }
/** * @since 2.13.0 */ public TimedCondition isPageVisibleTimed(Content page) { final PageElement element = getPageTreeAnchor(page); return element.withTimeout(UI_ACTION).timed().isVisible(); }
private void waitUntilPageIsFullyLoaded() { // this button appears very last in the page. Poller.waitUntilTrue(notTrustedRadioButton.withTimeout(TimeoutType.PAGE_LOAD).timed().isVisible()); } }
/** * @since 2.13.0 */ public TimedQuery<String> getSelectedPageTitleTimed() { return treeContainer.find(By.cssSelector("li a.highlighted")) .withTimeout(UI_ACTION) .timed() .getText(); }
public TrustedApplicationAuthenticationSection setIpPatterns(String ipPatterns) { Poller.waitUntilTrue(ipPatternsInput.withTimeout(TimeoutType.PAGE_LOAD).timed().isVisible()); ipPatternsInput.type(ipPatterns); return this; }
public BasicAccessAuthenticationSection setUsername(String username) { Poller.waitUntilTrue(usernameInput.withTimeout(TimeoutType.PAGE_LOAD).timed().isVisible()); usernameInput.type(username); return this; } }
/** * @since 2.13.0 */ public TimedQuery<Boolean> isClickableTimed(Content page) { return not(getPageTreeLi(page) .withTimeout(UI_ACTION) .timed() .hasClass("unclickable")); }
private <T extends DashboardEntitiesTab> T gotoTab(PageElement link, Class<T> tab, By tabSelector) { if (entitiesPanel.hasAttribute("data-ready-for-interaction", "false")) Poller.waitUntil("wait for global entities panel to load", pageElementFinder.find(By.cssSelector(".aui-tabs.global-entities")).withTimeout(TimeoutType.AJAX_ACTION).timed().hasAttribute("data-ready-for-interaction", "true"), is(true)); link.click(); final T tabPane = pageBinder.bind(tab); assertTrue(tabPane.isVisible()); Poller.waitUntil("wait for dashboard tab to load", pageElementFinder.find(tabSelector).withTimeout(TimeoutType.AJAX_ACTION).timed().hasClass("content-loaded"), is(true)); return tabPane; } }
@WaitUntil private void waitUntilFormIsRendered() { Poller.waitUntilTrue(getLoginButton().withTimeout(TimeoutType.AJAX_ACTION).timed().isPresent()); }
@Init @SuppressWarnings("unused") public void init() { Poller.waitUntilTrue(findLinkElement().withTimeout(TimeoutType.PAGE_LOAD).timed().isVisible()); }
public OauthIncomingAuthenticationWithAutoConfigSection clickUpdate2LOConfig() { updateButton.click(); OauthIncomingAuthenticationWithAutoConfigSection nextPage = pageBinder.bind(OauthIncomingAuthenticationWithAutoConfigSection.class); // Clicking the update button will cause the sub-iframe to be redirected first to the remote application, and // back to itself. One way to ensure this dance has completed is to wait for the update button to loaded again. Poller.waitUntilTrue(updateButton.withTimeout(TimeoutType.PAGE_LOAD).timed().isPresent()); return nextPage; }
public void refresh() { controlsButton.click(); findControlDialog().refresh(); // wait for popup to show up try { waitUntilTrue(elementFinder.find(By.id("refreshing-account-dialog")).timed().isVisible()); } catch (AssertionError e) { // ignore, the refresh was probably very quick and the popup has been already closed. } waitUntilFalse(elementFinder.find(By.id("refreshing-account-dialog")).withTimeout(PAGE_LOAD).timed().isVisible()); }
public void submit() { dialogElement.find(By.className("app-role-defaults-dialog-submit-button")).click(); Poller.waitUntilFalse(dialogElement.withTimeout(TimeoutType.AJAX_ACTION).timed().isPresent()); }
@Override public TimedCondition isAt() { return Conditions.and( searchHeader.timed().isPresent(), searchSwitcher.withTimeout(TimeoutType.COMPONENT_LOAD).timed().isPresent(), mainContent.timed().isPresent() ); }
public void sync() { rootElement.javascript().mouse().mouseover(); final PageElement syncIcon = getSyncIcon(); waitUntilTrue(syncIcon.timed().isPresent()); TimedQuery<Long> lastSync = Queries.forSupplier(timeouts, () -> NumberUtils.toLong(syncIcon.getAttribute("data-last-sync")), TimeoutType.SLOW_PAGE_LOAD); final long lastSyncBefore = lastSync.now(); syncIcon.javascript().mouse().click(); waitUntil(lastSync, greaterThan(lastSyncBefore)); waitUntilFalse(syncIcon.withTimeout(TimeoutType.SLOW_PAGE_LOAD).timed().hasClass("running")); }