Sha256: 6c5a6b2c3db3951c08f0a8355d2c187dd4b372f4fec60a6bd55aeb9df00caaa9
Contents?: true
Size: 1.45 KB
Versions: 10
Compression:
Stored size: 1.45 KB
Contents
module Capybara module Node ## # # A {Capybara::Node::Base} represents either an element on a page through the subclass # {Capybara::Node::Element} or a document through {Capybara::Node::Document}. # # Both types of Node share the same methods, used for interacting with the # elements on the page. These methods are divided into three categories, # finders, actions and matchers. These are found in the modules # {Capybara::Node::Finders}, {Capybara::Node::Actions} and {Capybara::Node::Matchers} # respectively. # # A {Capybara::Session} exposes all methods from {Capybara::Node::Document} directly: # # session = Capybara::Session.new(:rack_test, my_app) # session.visit('/') # session.fill_in('Foo', :with => 'Bar') # from Capybara::Node::Actions # bar = session.find('#bar') # from Capybara::Node::Finders # bar.select('Baz', :from => 'Quox') # from Capybara::Node::Actions # session.has_css?('#foobar') # from Capybara::Node::Matchers # class Base attr_reader :session, :base include Capybara::Node::Finders include Capybara::Node::Actions include Capybara::Node::Matchers def initialize(session, base) @session = session @base = base end protected def wait? driver.wait? end def driver session.driver end end end end
Version data entries
10 entries across 10 versions & 3 rubygems