/** * Does it have a X that when clicked dismisses message * * @return if closeable or not */ public boolean isCloseable() { return this.flagElement.find(By.className("icon-close")).isPresent(); }
/** * Does it have a X that when clicked dismisses message * * @return if closeable or not */ public boolean isCloseable() { return message.find(By.className("icon-close")).isPresent(); }
public String getSelectedScheme() { if (select.isPresent()) { return schemeSelect.getSelected().text(); } else { return null; } }
/** * Does it have a X that when clicked dismisses message * * @return if closeable or not */ public boolean isCloseable() { return this.flagElement.find(By.className("icon-close")).isPresent(); }
/** * Does it have a X that when clicked dismisses message * * @return if closeable or not */ public boolean isCloseable() { return this.flagElement.find(By.className("icon-close")).isPresent(); }
public Workflow getWorkflow(final String workflow) { final PageElement pageElement = editorElement.find(cssSelector(format("tr[data-workflow-name='%s']", escapeForCss(workflow)))); if (!pageElement.isPresent()) { throw new IllegalArgumentException(format("Can't find workflow '%s' in the scheme.", workflow)); } return new Workflow(pageElement); }
public TimedCondition isVisibleTimed() { // Some dialogs can do things like WRM.require() / other AJAX-y stuff, which blocks their display. return Conditions.forSupplier(timeouts.timeoutFor(TimeoutType.SLOW_PAGE_LOAD), () -> getDialog().isPresent() && getDialog().isVisible() && (!confluenceLoadingIndicator.isPresent() || !confluenceLoadingIndicator.isVisible()) && (!confluenceLoadingBlanket.isPresent() || !confluenceLoadingBlanket.isVisible())); }
public EditIssueTypeSchemePage reset() { assertTrue("Reset button is not present.", submitReset.isPresent()); submitReset.click(); return pageBinder.bind(EditIssueTypeSchemePage.class); } }
@Override public String getDescription() { PageElement description = row.find(By.className("application-property-description")); return description.isPresent() ? description.getText() : null; }
public boolean sharedUserBaseIsPresent() { // wait until the admin checkbox is visible, then check for the shared userbase one. Poller.waitUntilTrue(isAdminCheckBox.timed().isVisible()); return sharedUserbaseCheckBox.isPresent(); } }
public TimedQuery<Boolean> hasMacroPlaceholder(final String macroName) { return execute.queryOnTinyMceIFrame(() -> { final PageElement pageElement = page.find(By.cssSelector("[data-macro-name='" + macroName + "']")); return pageElement.isPresent() && pageElement.isVisible(); }); }
public ApplicationDetailsSection configureApplicationLink(String linkUrl) { waitUntilTrue(isApplinksListFullyLoaded()); PageElement row = elementFinder.find(By.id("ual-row-" + linkUrl)); if (!row.isPresent()) { throw new IllegalStateException("cannot configure app that doesn't exist:[" + linkUrl + "]"); } row.find(By.className("app-edit-link")).click(); waitUntilTrue(editApplicationLinkDialog.timed().isVisible()); return pageBinder.bind(ApplicationDetailsSection.class); }
public CreateNonUalDialog clickContinueExpectingAnError() throws Exception { Poller.waitUntilTrue(continueButton.timed().isVisible()); if ((createIncomingCheckBox.isPresent() && createIncomingCheckBox.isSelected())) { throw new Exception("For incoming links use clickContinueToCreateNonUalIncomingLink instead"); } continueButton.click(); Poller.waitUntilTrue(continueButton.timed().isVisible()); return this; }
public PauseDialog clickContinueToCreateNonUalLink() throws Exception { Poller.waitUntilTrue(continueButton.timed().isVisible()); if ((createIncomingCheckBox.isPresent() && createIncomingCheckBox.isSelected())) { throw new Exception("For incoming links use clickContinueToCreateNonUalIncomingLink instead"); } continueButton.click(); Poller.waitUntilFalse(continueButton.timed().isVisible()); return pageBinder.bind(PauseDialog.class); }
public TimedCondition isVisibleTimed() { // Dialog2 has visibility set to hidden on its container, so need to assert the dialog content is visible instead return Conditions.forSupplier(timeouts.timeoutFor(TimeoutType.SLOW_PAGE_LOAD), () -> getDialog().isPresent() && getDialog().find(By.className(CONTENT_CLASSNAME)).isVisible()); } }
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(); }
@Override public FieldScreenItem apply(final PageElement pageElement) { final String fieldConfigName = pageElement.find(By.className("field-screen-name")).getText(); String fieldDescriptionName = ""; if (pageElement.find(By.className("field-screen-description")).isPresent()) { fieldDescriptionName = pageElement.find(By.className("field-screen-description")).getText(); } return new FieldScreenItem(fieldConfigName, fieldDescriptionName); } }));
@Override public FieldConfigurationItem apply(final PageElement pageElement) { final String fieldConfigName = pageElement.find(By.cssSelector("[data-scheme-field='name']")).getText(); String fieldDescriptionName = ""; if (pageElement.find(By.cssSelector("[data-scheme-field='description']")).isPresent()) { fieldDescriptionName = pageElement.find(By.cssSelector("[data-scheme-field='description']")).getText(); } return new FieldConfigurationItem(fieldConfigName, fieldDescriptionName); } }));
/** * For Confluence 5.8 or later, this will return the tooltip of the labels icon in the page metadata next to the * breadcrumbs. For pre-5.8, this will return the visible text on the labels button in the page footer. */ public TimedQuery<String> getLabelsButtonText() { waitUntilTrue(labelsButton.timed().isVisible()); if (labelsButton.find(By.className("trigger-text")).isPresent()) { return labelsButton.find(By.className("trigger-text")).timed().getText(); } else { return labelsButton.timed().getAttribute("data-tooltip"); } }
/** * For Confluence 5.8 or later, this will return the tooltip of the restrictions icon in the page metadata next to * the breadcrumbs. For pre-5.8, this will return the visible text on the restrictions button in the page footer. */ public TimedCondition hasRestrictionsButtonText(String text) { waitUntilTrue(restrictionsButton.timed().isVisible()); if (restrictionsButton.find(By.className("trigger-text")).isPresent()) { return restrictionsButton.find(By.className("trigger-text")).timed().hasText(text); } else { return restrictionsButton.timed().hasAttribute("data-tooltip", text); } }