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.



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

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

Instance Attribute Details

#driverObject (readonly)

Returns the value of attribute driver.



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

def driver
  @driver
end

#nativeObject (readonly)

Returns the value of attribute native.



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

def native
  @native
end

Instance Method Details

#==(other) ⇒ Object



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

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

#[](name) ⇒ Object

Raises:

  • (NotImplementedError)


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

def [](name)
  raise NotImplementedError
end

#all_textObject

Raises:

  • (NotImplementedError)


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

def all_text
  raise NotImplementedError
end

#checked?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def checked?
  raise NotImplementedError
end

#clickObject

Raises:

  • (NotImplementedError)


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

def click
  raise NotImplementedError
end

#disabled?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def disabled?
  raise NotImplementedError
end

#double_clickObject

Raises:

  • (NotImplementedError)


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

def double_click
  raise NotImplementedError
end

#drag_to(element) ⇒ Object

Raises:

  • (NotImplementedError)


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

def drag_to(element)
  raise NotImplementedError
end

#hoverObject

Raises:

  • (NotImplementedError)


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

def hover
  raise NotImplementedError
end

#inspectObject



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

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

#pathObject



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

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

#right_clickObject

Raises:

  • (NotImplementedError)


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

def right_click
  raise NotImplementedError
end

#select_optionObject

Raises:

  • (NotImplementedError)


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

def select_option
  raise NotImplementedError
end

#selected?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def selected?
  raise NotImplementedError
end

#send_keys(*args) ⇒ Object

Raises:

  • (NotImplementedError)


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

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)


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

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

#tag_nameObject

Raises:

  • (NotImplementedError)


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

def tag_name
  raise NotImplementedError
end

#trigger(event) ⇒ Object



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

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

#unselect_optionObject

Raises:

  • (NotImplementedError)


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

def unselect_option
  raise NotImplementedError
end

#valueObject

Raises:

  • (NotImplementedError)


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

def value
  raise NotImplementedError
end

#visible?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def visible?
  raise NotImplementedError
end

#visible_textObject

Raises:

  • (NotImplementedError)


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

def visible_text
  raise NotImplementedError
end