lib/jenkins/builder/app.rb in jenkins-builder-0.2.6 vs lib/jenkins/builder/app.rb in jenkins-builder-0.3.0

- old
+ new

@@ -163,11 +163,11 @@ end puts Pastel.new.cyan.bold("\n%s%s %s %s%s\n" % [' '*30, '★ '*5, msg, '★ '*5, ' '*30]) end def start_build_use_ferrum(job_name, branch) - browser = Ferrum::Browser.new + browser = Ferrum::Browser.new(headless: true) browser.goto("#{config.url}/login") username_input = browser.at_css('input[name=j_username]') password_input = browser.at_css('input[name=j_password]') username_input.focus.type(config.username) password_input.focus.type(config.password) @@ -177,10 +177,10 @@ sleep(2) browser.evaluate("document.querySelector('#gitParameterSelect').value = '#{branch}'") browser.at_css('#yui-gen1-button').click else browser.goto("#{config.url}/job/#{job_name}/") - browser.at_xpath('#tasks a.task-link').click + browser.at_css('#tasks a.task-link[onclick^=return\ build]').click end browser.quit end def check_and_show_result(job_name, latest_build_no)