Search in sources :

Example 1 with Control

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

the class OpenstackCloud method testConnection.

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

Example 2 with Control

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

the class SubversionCredentialUserPwd method setUsername.

public void setUsername(String username) {
    switchToPopupHandle();
    Control userField = control(by.input(INPUT_USERNAME));
    userField.set(username);
    switchToParentHandle();
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control)

Example 3 with Control

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

the class MailerGlobalConfig method sendTestMail.

public void sendTestMail(String recipient) {
    control(by.path(getPath() + '/')).check();
    // these two controls have weird paths that don't fit well with relative path expression
    new Control(getPage(), "/hudson-tasks-Mailer//sendTestMailTo").set(recipient);
    new Control(getPage(), "/hudson-tasks-Mailer//validate-button").click();
    waitFor(driver, hasContent("Email was successfully sent"), 30);
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control)

Example 4 with Control

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

the class Scriptler method upload.

public Script upload(Resource script) {
    visit(url("scriptsettings"));
    new Control(injector, by.name("file")).upload(script);
    clickButton("Upload");
    return new Script(this, script.getName());
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control)

Example 5 with Control

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

the class LabelParameter method fillWith.

@Override
public void fillWith(Object v) {
    Control control = control("value");
    // TODO in some cases the LabelParameter is simple text entry, in others it is a drop down
    control.set(v.toString());
}
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