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

- (Node) initialize(driver, native)

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

- (Object) driver (readonly)

Returns the value of attribute driver



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

def driver
  @driver
end

- (Object) native (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

- (Object) ==(other)



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

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

- (Object) [](name)

Raises:

  • (NotImplementedError)


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

def [](name)
  raise NotImplementedError
end

- (Object) all_text

Raises:

  • (NotImplementedError)


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

def all_text
  raise NotImplementedError
end

- (Boolean) checked?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def checked?
  raise NotImplementedError
end

- (Object) click

Raises:

  • (NotImplementedError)


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

def click
  raise NotImplementedError
end

- (Boolean) disabled?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def disabled?
  raise NotImplementedError
end

- (Object) double_click

Raises:

  • (NotImplementedError)


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

def double_click
  raise NotImplementedError
end

- (Object) drag_to(element)

Raises:

  • (NotImplementedError)


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

def drag_to(element)
  raise NotImplementedError
end

- (Object) hover

Raises:

  • (NotImplementedError)


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

def hover
  raise NotImplementedError
end

- (Object) inspect



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

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

- (Object) path



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

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

- (Object) right_click

Raises:

  • (NotImplementedError)


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

def right_click
  raise NotImplementedError
end

- (Object) select_option

Raises:

  • (NotImplementedError)


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

def select_option
  raise NotImplementedError
end

- (Boolean) selected?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def selected?
  raise NotImplementedError
end

- (Object) set(value, options = {})

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

- (Object) tag_name

Raises:

  • (NotImplementedError)


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

def tag_name
  raise NotImplementedError
end

- (Object) trigger(event)



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

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

- (Object) unselect_option

Raises:

  • (NotImplementedError)


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

def unselect_option
  raise NotImplementedError
end

- (Object) value

Raises:

  • (NotImplementedError)


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

def value
  raise NotImplementedError
end

- (Boolean) visible?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def visible?
  raise NotImplementedError
end

- (Object) visible_text

Raises:

  • (NotImplementedError)


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

def visible_text
  raise NotImplementedError
end