Module: PrependCapybaraSession
- Defined in:
- lib/cyperful/framework_injections.rb
Overview
we need to override the some Capybara::Session methods because they control the top-level browser window, but we want them to control the iframe instead
Instance Method Summary collapse
Instance Method Details
#current_url ⇒ Object
10 11 12 13 14 |
# File 'lib/cyperful/framework_injections.rb', line 10 def current_url url = Cyperful.current&.internal_current_url return url if url super end |
#refresh ⇒ Object
16 17 18 19 |
# File 'lib/cyperful/framework_injections.rb', line 16 def refresh return if Cyperful.current&.internal_visit(current_url) super end |
#visit(url) ⇒ Object
5 6 7 8 |
# File 'lib/cyperful/framework_injections.rb', line 5 def visit(url) return if Cyperful.current&.internal_visit(url) super end |