Skip to content

Commit

Permalink
Visit links instead of computing url manually
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe committed Jun 23, 2016
1 parent f12d28f commit 6adb445
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/java/org/jenkinsci/test/acceptance/po/Job.java
Expand Up @@ -275,14 +275,10 @@ public Build scheduleBuild() {

public Build scheduleBuild(Map<String, ?> params) {
int nb = getJson().get("nextBuildNumber").intValue();
visit(getBuildUrl());

// if the security is enabled, GET request above will fail
if (driver.getTitle().contains("Form post required")) {
find(by.button("Proceed")).click();
}

if (!parameters.isEmpty()) {
if (parameters.isEmpty()) {
clickLink("Build Now");
} else {
clickLink("Build with Parameters");
for (Parameter def : parameters) {
Object v = params.get(def.getName());
if (v != null) {
Expand Down

0 comments on commit 6adb445

Please sign in to comment.