lib/amazon_auth/client.rb in amazon_auth-0.3.2 vs lib/amazon_auth/client.rb in amazon_auth-0.3.3

- old
+ new

@@ -39,13 +39,16 @@ submit_signin_form end def submit_signin_form debug "Begin submit_signin_form" - return true unless session.has_selector?('#signInSubmit') - session.fill_in 'ap_email', with: @login + unless session.has_selector?('#signInSubmit') + log "signInSubmit button not found" + return false + end + session.fill_in 'ap_email', with: @login if session.first('#ap_email').value.blank? session.fill_in 'ap_password', with: @password - session.click_on('signInSubmit') + session.first('#signInSubmit').click log "Clicked signInSubmit" raise('Failed on signin') if alert_displayed? while image_recognition_displayed? do retry_signin_form_with_image_recognition