mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Fix spec failures
This commit is contained in:
parent
e514f2e99c
commit
a2b1b3315e
1 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,10 @@ module Capybara
|
|||
# @raise [Capybara::ElementNotFound] If the element can't be found before time expires
|
||||
#
|
||||
def find(*args)
|
||||
node = wait_conditionally_until { all(*args).first }
|
||||
begin
|
||||
node = wait_conditionally_until { all(*args).first }
|
||||
rescue TimeoutError
|
||||
end
|
||||
unless node
|
||||
options = if args.last.is_a?(Hash) then args.last else {} end
|
||||
raise Capybara::ElementNotFound, options[:message] || "Unable to find '#{args[1] || args[0]}'"
|
||||
|
|
Loading…
Add table
Reference in a new issue