Module: Cornucopia::Capybara::FinderExtensions
- Defined in:
- lib/cornucopia/capybara/finder_extensions.rb
Instance Method Summary collapse
- #__cornucopia_finder_function(finder_function, *args) ⇒ Object
- #all(*args) ⇒ Object
- #find(*args) ⇒ Object
Instance Method Details
#__cornucopia_finder_function(finder_function, *args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cornucopia/capybara/finder_extensions.rb', line 15 def __cornucopia_finder_function(finder_function, *args) retry_count = 0 result = nil = (*args) begin retry_count += 1 result = send("__cornucopia_orig_#{finder_function}", *args) rescue Selenium::WebDriver::Error::StaleElementReferenceError retry if __cornucopia__retry_finder(retry_count, ) result = __cornucopia__analyze_finder(finder_function, , *args) rescue Exception result = __cornucopia__analyze_finder(finder_function, , *args) end result end |
#all(*args) ⇒ Object
11 12 13 |
# File 'lib/cornucopia/capybara/finder_extensions.rb', line 11 def all(*args) __cornucopia_finder_function(:all, *args) end |
#find(*args) ⇒ Object
7 8 9 |
# File 'lib/cornucopia/capybara/finder_extensions.rb', line 7 def find(*args) __cornucopia_finder_function(:find, *args) end |