Skip to content

Commit

Permalink
adding InvalidElementStateError back in
Browse files Browse the repository at this point in the history
  • Loading branch information
joesho112358 authored and jkotests committed Dec 29, 2019
1 parent 5379582 commit 3a69990
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/watir/elements/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,10 @@ def element_call(precondition = nil, &block)
raise_present unless Wait.timer.remaining_time.positive?
raise_present unless %i[wait_for_present wait_for_enabled wait_for_writable].include?(precondition)
retry
rescue Selenium::WebDriver::Error::InvalidElementStateError
raise_disabled unless Wait.timer.remaining_time.positive?
raise_disabled unless %i[wait_for_present wait_for_enabled wait_for_writable].include?(precondition)
retry
rescue Selenium::WebDriver::Error::NoSuchWindowError
raise NoMatchingWindowFoundException, 'browser window was closed'
ensure
Expand Down

0 comments on commit 3a69990

Please sign in to comment.