public boolean apply(PageElement input) { // Keep only selected checkboxes return input.isSelected(); } });
public CreateAccount acceptLicenseAgreement(boolean whether) { if (whether ^ licenseAgreement.isSelected()) { licenseAgreement.click(); } return this; }
private void setCheckbox(final boolean whether, final PageElement checkbox) { if(checkbox.isSelected() ^ whether) { checkbox.toggle(); } }
public void setQuickSearch(boolean on) { if (on && !enableQuickNavCheckBox.isSelected()) { enableQuickNavCheckBox.click(); } else if (!on && enableQuickNavCheckBox.isSelected()) { enableQuickNavCheckBox.click(); } }
public void select() { if (!checkbox.isSelected()) { checkbox.click(); } }
/** * Checks to see if Watch this page checkbox is visible and checked in the quick editor */ public boolean watchThisPageCheckboxCheckedCondition() { return watchThisPageCheckboxVisibleCondition() && watchPageCheckbox.isSelected(); }
public void disableLimitSearchResults() { if (spaceSearchEnabledChechbox.isSelected()) { spaceSearchEnabledChechbox.click(); confirmButton.click(); } }
private CopyPageHierarchyDialog setCheckboxChecked(PageElement checkbox, boolean checked) { if (checked) { checkbox.select(); } else { if (checkbox.isSelected()) { checkbox.toggle(); } } return this; } }
public void setAlsoDeleteChildPages(boolean checked) { if (checked) { alsoDeleteChildrenCheckbox.select(); } else if (alsoDeleteChildrenCheckbox.isSelected()) { alsoDeleteChildrenCheckbox.toggle(); } }
public CopyDialog setIncludeChildrenChecked(boolean checked) { if (checked) { includeChildrenCheckbox.select(); } else { if (includeChildrenCheckbox.isSelected()) { includeChildrenCheckbox.toggle(); } } return this; }
public BlueprintAddSpaceForm setPermissionPrivate(boolean isPrivate) { PageElement permissionPrivate = getPermissionPrivate(); boolean isAlreadyPrivate = permissionPrivate.isSelected(); if (isPrivate != isAlreadyPrivate) permissionPrivate.click(); return this; }
public AddUserWithAppPermissionsPage setDevelopersGroup(final boolean value) { if (value) { developersGroup.select(); } else if (developersGroup.isSelected()) { developersGroup.toggle(); } return this; }
public MovePageDialog clickMoveAndExpectReorder() { Assert.assertTrue("you can only expect a reorder if you have selected the reorder checkbox!", reorderCheckbox.isSelected()); moveButton.click(); Poller.waitUntilTrue(reorderPanelInformationMessageDiv.timed().isVisible()); return this; }
public CreateNonUalDialog checkCreateIncomingCheckBox() { Poller.waitUntilTrue(createIncomingCheckBox.timed().isVisible()); if (!createIncomingCheckBox.isSelected()) { createIncomingCheckBox.click(); } return this; }
public CreateUalDialog checkSharedUserbase() { Poller.waitUntilTrue(sharedUserbaseCheckBox.timed().isVisible()); if (!sharedUserbaseCheckBox.isSelected()) { sharedUserbaseCheckBox.click(); } return this; }
public SelectedItem unselectRow() { if (rowElement.find(By.tagName("input")).isSelected()) { rowElement.find(By.tagName("input")).click(); } return this; }
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 boolean adminIsChecked() { Poller.waitUntilTrue(isAdminCheckBox.timed().isPresent()); Poller.waitUntilTrue(isAdminCheckBox.timed().isVisible()); return isAdminCheckBox.isSelected(); }
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 CreateUalDialog unCheckAdmin() { Poller.waitUntilTrue(isAdminCheckBox.timed().isPresent()); Poller.waitUntilTrue(isAdminCheckBox.timed().isVisible()); if (isAdminCheckBox.isSelected()) { isAdminCheckBox.click(); } return this; }