Class: Capybara::Vue::Waiter
- Inherits:
-
Object
- Object
- Capybara::Vue::Waiter
- Defined in:
- lib/capybara/vue/waiter.rb
Instance Attribute Summary collapse
-
#page ⇒ Object
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(page) ⇒ Waiter
constructor
A new instance of Waiter.
- #wait_until_ready ⇒ Object
Constructor Details
#initialize(page) ⇒ Waiter
Returns a new instance of Waiter.
6 7 8 |
# File 'lib/capybara/vue/waiter.rb', line 6 def initialize(page) @page = page end |
Instance Attribute Details
#page ⇒ Object
Returns the value of attribute page.
4 5 6 |
# File 'lib/capybara/vue/waiter.rb', line 4 def page @page end |
Instance Method Details
#wait_until_ready ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/capybara/vue/waiter.rb', line 10 def wait_until_ready return unless vue_loaded? setup_ready start = Time.now until ready? timeout! if timeout?(start) setup_ready if page_reloaded_on_wait? sleep(0.01) end end |