2009-12-24 00:41:34 -05:00
|
|
|
module Capybara
|
|
|
|
class Node
|
|
|
|
include Searchable
|
2009-12-29 23:43:14 -05:00
|
|
|
|
2009-12-24 00:41:34 -05:00
|
|
|
attr_reader :driver, :node
|
|
|
|
|
|
|
|
def initialize(driver, node)
|
|
|
|
@driver = driver
|
|
|
|
@node = node
|
|
|
|
end
|
|
|
|
|
|
|
|
def text
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def [](name)
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def value
|
|
|
|
self[:value]
|
|
|
|
end
|
|
|
|
|
|
|
|
def set(value)
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def select(option)
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
2010-02-19 15:37:46 -05:00
|
|
|
def unselect(option)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2009-12-24 00:41:34 -05:00
|
|
|
def click
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def drag_to(element)
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def tag_name
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def visible?
|
2009-12-29 23:43:14 -05:00
|
|
|
raise NotImplementedError
|
2009-12-24 00:41:34 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def path
|
|
|
|
raise NotSupportedByDriverError
|
|
|
|
end
|
2010-02-15 08:54:11 -05:00
|
|
|
|
|
|
|
def trigger(event)
|
|
|
|
raise NotSupportedByDriverError
|
|
|
|
end
|
2009-12-22 15:13:55 -05:00
|
|
|
end
|
2009-12-11 16:40:23 -05:00
|
|
|
end
|