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.
-
#using_wait_time(seconds, &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
154 155 156 |
# File 'lib/capybara/dsl.rb', line 154 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.
126 127 128 |
# File 'lib/capybara/dsl.rb', line 126 def using_session(name, &block) .using_session(name, &block) end |
#using_wait_time(seconds, &block) ⇒ Object
Shortcut to working in a different session. This is useful when Capybara is included in a class or module.
135 136 137 |
# File 'lib/capybara/dsl.rb', line 135 def using_wait_time(seconds, &block) .using_wait_time(seconds, &block) end |