1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara/node.rb

39 lines
675 B
Ruby
Raw Normal View History

require 'capybara/node/finders'
require 'capybara/node/actions'
require 'capybara/node/matchers'
module Capybara
class Node
2010-07-09 19:58:34 -04:00
attr_reader :session, :base
include Capybara::Node::Finders
include Capybara::Node::Actions
include Capybara::Node::Matchers
2010-07-09 19:58:34 -04:00
def initialize(session, base)
@session = session
@base = base
end
protected
def driver
session.driver
end
end
class Element < Node
# TODO: maybe we should explicitely delegate?
def method_missing(*args)
@base.send(*args)
end
def respond_to?(method)
super || @base.respond_to?(method)
end
end
class Document < Node
end
end