Search in sources :

Example 11 with Control

use of org.jenkinsci.test.acceptance.po.Control in project acceptance-test-harness by jenkinsci.

the class SecurityDisabler method stopUsingSecurityAndSave.

/**
 * Stop using security (if previously used) and save config.
 */
public void stopUsingSecurityAndSave() {
    open();
    Control use = control("/useSecurity");
    if (use.resolve().isSelected()) {
        use.click();
        control("/Submit").click();
    }
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control)

Example 12 with Control

use of org.jenkinsci.test.acceptance.po.Control in project acceptance-test-harness by jenkinsci.

the class ForemanSharedNodeCloudPageArea method testConnection.

/**
 * Test connection.
 * @return ForemanCloudPageArea.
 */
public FormValidation testConnection() {
    Control button = control("validate-button");
    button.click();
    return button.getFormValidation();
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control)

Example 13 with Control

use of org.jenkinsci.test.acceptance.po.Control in project acceptance-test-harness by jenkinsci.

the class OpenstackSlaveTemplate method keyPair.

public OpenstackSlaveTemplate keyPair(String name) {
    ensureAdvancedOpened();
    Control control = control("slaveOptions/keyPairName", "keyPairName");
    try {
        control.select(name);
    } catch (WebDriverException ex) {
        control.set(name);
    }
    return this;
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control) WebDriverException(org.openqa.selenium.WebDriverException)

Example 14 with Control

use of org.jenkinsci.test.acceptance.po.Control in project acceptance-test-harness by jenkinsci.

the class SubversionCredential method confirmDialog.

/**
 * Confirms and closes the Credential dialog.
 */
public void confirmDialog() {
    switchToPopupHandle();
    Control buttonOk = control(by.button(BUTTON_OK));
    buttonOk.click();
    ((JavascriptExecutor) driver).executeScript("window.close()");
    switchToParentHandle();
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control) JavascriptExecutor(org.openqa.selenium.JavascriptExecutor)

Example 15 with Control

use of org.jenkinsci.test.acceptance.po.Control in project acceptance-test-harness by jenkinsci.

the class SubversionCredentialUserPwd method setPassword.

public void setPassword(String password) {
    switchToPopupHandle();
    Control pwdField = control(by.input(INPUT_PASSWORD));
    pwdField.set(password);
    switchToParentHandle();
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control)

Aggregations

Control (org.jenkinsci.test.acceptance.po.Control)15 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 ProjectDefaultBuildAccessControl (org.jenkinsci.test.acceptance.plugins.authorize_project.ProjectDefaultBuildAccessControl)1 ConfigurablePageObject (org.jenkinsci.test.acceptance.po.ConfigurablePageObject)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 Job (org.jenkinsci.test.acceptance.po.Job)1 ToolInstallationPageObject (org.jenkinsci.test.acceptance.po.ToolInstallationPageObject)1 Test (org.junit.Test)1 JavascriptExecutor (org.openqa.selenium.JavascriptExecutor)1 WebDriverException (org.openqa.selenium.WebDriverException)1