Skip to content

Commit

Permalink
Fix watir infinite retry
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Jun 5, 2015
1 parent 2612c7b commit 8e8baa8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/angular_webdriver/protractor/watir_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ def all(*args)

class Element

# Always raise on stale element ref error. Prevents infinite retry loop.
def element_call
yield
rescue Selenium::WebDriver::Error::StaleElementReferenceError
raise
end

def selected?
assert_exists
element_call { @element.selected? }
Expand Down

0 comments on commit 8e8baa8

Please sign in to comment.