2010-07-09 14:08:33 -04:00
|
|
|
module Capybara
|
|
|
|
module Driver
|
|
|
|
class Node
|
2010-07-15 14:55:12 -04:00
|
|
|
attr_reader :driver, :native
|
2010-07-09 14:08:33 -04:00
|
|
|
|
2010-07-15 14:55:12 -04:00
|
|
|
def initialize(driver, native)
|
2010-07-09 14:08:33 -04:00
|
|
|
@driver = driver
|
2010-07-15 14:55:12 -04:00
|
|
|
@native = native
|
2010-07-09 14:08:33 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def text
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](name)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def value
|
2010-07-09 21:11:54 -04:00
|
|
|
raise NotImplementedError
|
2010-07-09 14:08:33 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def set(value)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2010-08-14 07:42:53 -04:00
|
|
|
def select_option
|
2010-07-09 14:08:33 -04:00
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2010-08-14 07:42:53 -04:00
|
|
|
def unselect_option
|
2010-07-09 14:08:33 -04:00
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def click
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def drag_to(element)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def tag_name
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def visible?
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2010-12-23 13:38:44 -05:00
|
|
|
def checked?
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def selected?
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2010-07-09 14:08:33 -04:00
|
|
|
def path
|
|
|
|
raise NotSupportedByDriverError
|
|
|
|
end
|
|
|
|
|
|
|
|
def trigger(event)
|
|
|
|
raise NotSupportedByDriverError
|
|
|
|
end
|
2010-07-10 10:34:33 -04:00
|
|
|
|
|
|
|
def inspect
|
|
|
|
%(#<Capybara::Driver::Node tag="#{tag_name}" path="#{path}">)
|
|
|
|
rescue NotSupportedByDriverError
|
|
|
|
%(#<Capybara::Driver::Node tag="#{tag_name}">)
|
|
|
|
end
|
2010-07-09 14:08:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|