Module: Capybara::DSL
- Included in:
- Capybara
- Defined in:
- lib/capybara/dsl.rb
Instance Method Summary collapse
-
#page ⇒ Capybara::Session
Shortcut to accessing the current session.
-
#using_session(name, &block) ⇒ Object
Shortcut to working in a different session.
Instance Method Details
#page ⇒ Capybara::Session
Shortcut to accessing the current session. This is useful when Capybara is included in a class or module.
class MyClass
include ::DSL
def has_header?
page.has_css?('h1')
end
end
132 133 134 |
# File 'lib/capybara/dsl.rb', line 132 def page .current_session end |
#using_session(name, &block) ⇒ Object
Shortcut to working in a different session. This is useful when Capybara is included in a class or module.
113 114 115 |
# File 'lib/capybara/dsl.rb', line 113 def using_session(name, &block) .using_session(name, &block) end |