Method: Capybara::DSL#page

Defined in:
lib/capybara/dsl.rb

#pageCapybara::Session

Shortcut to accessing the current session.

class MyClass
  include Capybara::DSL

  def has_header?
    page.has_css?('h1')
  end
end

Returns:



45
46
47
# File 'lib/capybara/dsl.rb', line 45

def page
  Capybara.current_session
end