A new instance of BecomeClosed.
Returns a new instance of BecomeClosed.
7 8 9
# File 'lib/capybara/rspec/matchers/become_closed.rb', line 7 def initialize(options) @options = options endInstance Method Details #failure_message ⇒ Object
23 24 25
# File 'lib/capybara/rspec/matchers/become_closed.rb', line 23 def failure_message "expected #{@window.inspect} to become closed after #{@wait_time} seconds" end#failure_message_when_negated ⇒ Object
27 28 29
# File 'lib/capybara/rspec/matchers/become_closed.rb', line 27 def failure_message_when_negated "expected #{@window.inspect} not to become closed after #{@wait_time} seconds" end#matches?(window) ⇒ Boolean
11 12 13 14 15 16 17 18 19 20 21
# File 'lib/capybara/rspec/matchers/become_closed.rb', line 11 def matches?(window) @window = window @wait_time = Capybara::Queries::BaseQuery.wait(@options, window.session.config.default_max_wait_time) timer = Capybara::Helpers.timer(expire_in: @wait_time) while window.exists? return false if timer.expired? sleep 0.01 end true end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4