Module: Capybara::DSL
- Included in:
- Capybara
- Defined in:
- lib/capybara/dsl.rb
Instance Method Summary (collapse)
-
- (Capybara::Session) page
Shortcut to accessing the current session.
-
- (Object) using_session(name, &block)
Shortcut to working in a different session.
-
- (Object) using_wait_time(seconds, &block)
Shortcut to using a different wait time.
Instance Method Details
- (Capybara::Session) page
Shortcut to accessing the current session.
class MyClass
include Capybara::DSL
def has_header?
page.has_css?('h1')
end
end
36 37 38 |
# File 'lib/capybara/dsl.rb', line 36 def page Capybara.current_session end |
- (Object) using_session(name, &block)
Shortcut to working in a different session.
10 11 12 |
# File 'lib/capybara/dsl.rb', line 10 def using_session(name, &block) Capybara.using_session(name, &block) end |
- (Object) using_wait_time(seconds, &block)
Shortcut to using a different wait time.
18 19 20 |
# File 'lib/capybara/dsl.rb', line 18 def using_wait_time(seconds, &block) Capybara.using_wait_time(seconds, &block) end |