Class: Capybara::Driver::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/driver/node.rb

Direct Known Subclasses

RackTest::Node, Selenium::Node

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(driver, native) ⇒ Node

Returns a new instance of Node.



6
7
8
9
# File 'lib/capybara/driver/node.rb', line 6

def initialize(driver, native)
  @driver = driver
  @native = native
end

Instance Attribute Details

#driverObject (readonly)

Returns the value of attribute driver.



4
5
6
# File 'lib/capybara/driver/node.rb', line 4

def driver
  @driver
end

#nativeObject (readonly)

Returns the value of attribute native.



4
5
6
# File 'lib/capybara/driver/node.rb', line 4

def native
  @native
end

Instance Method Details

#==(other) ⇒ Object



99
100
101
# File 'lib/capybara/driver/node.rb', line 99

def ==(other)
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#=='
end

#[](name) ⇒ Object

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/capybara/driver/node.rb', line 19

def [](name)
  raise NotImplementedError
end

#all_textObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/capybara/driver/node.rb', line 11

def all_text
  raise NotImplementedError
end

#checked?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


73
74
75
# File 'lib/capybara/driver/node.rb', line 73

def checked?
  raise NotImplementedError
end

#clickObject

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/capybara/driver/node.rb', line 41

def click
  raise NotImplementedError
end

#disabled?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


81
82
83
# File 'lib/capybara/driver/node.rb', line 81

def disabled?
  raise NotImplementedError
end

#double_clickObject

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/capybara/driver/node.rb', line 49

def double_click
  raise NotImplementedError
end

#drag_to(element) ⇒ Object

Raises:

  • (NotImplementedError)


61
62
63
# File 'lib/capybara/driver/node.rb', line 61

def drag_to(element)
  raise NotImplementedError
end

#hoverObject

Raises:

  • (NotImplementedError)


57
58
59
# File 'lib/capybara/driver/node.rb', line 57

def hover
  raise NotImplementedError
end

#inspectObject



93
94
95
96
97
# File 'lib/capybara/driver/node.rb', line 93

def inspect
  %(#<#{self.class} tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError
  %(#<#{self.class} tag="#{tag_name}">)
end

#pathObject



85
86
87
# File 'lib/capybara/driver/node.rb', line 85

def path
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#path'
end

#right_clickObject

Raises:

  • (NotImplementedError)


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

def right_click
  raise NotImplementedError
end

#select_optionObject

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/capybara/driver/node.rb', line 33

def select_option
  raise NotImplementedError
end

#selected?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


77
78
79
# File 'lib/capybara/driver/node.rb', line 77

def selected?
  raise NotImplementedError
end

#send_keys(*args) ⇒ Object

Raises:

  • (NotImplementedError)


53
54
55
# File 'lib/capybara/driver/node.rb', line 53

def send_keys(*args)
  raise NotImplementedError
end

#set(value, options = {}) ⇒ Object

Parameters:

  • value

    String or Array. Array is only allowed if node has ‘multiple’ attribute

  • options (Hash{}) (defaults to: {})

    Driver specific options for how to set a value on a node

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/capybara/driver/node.rb', line 29

def set(value, options={})
  raise NotImplementedError
end

#tag_nameObject

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/capybara/driver/node.rb', line 65

def tag_name
  raise NotImplementedError
end

#trigger(event) ⇒ Object



89
90
91
# File 'lib/capybara/driver/node.rb', line 89

def trigger(event)
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger'
end

#unselect_optionObject

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/capybara/driver/node.rb', line 37

def unselect_option
  raise NotImplementedError
end

#valueObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/capybara/driver/node.rb', line 23

def value
  raise NotImplementedError
end

#visible?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


69
70
71
# File 'lib/capybara/driver/node.rb', line 69

def visible?
  raise NotImplementedError
end

#visible_textObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/capybara/driver/node.rb', line 15

def visible_text
  raise NotImplementedError
end