Class: Capybara::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Searchable

#all, #find, #find_button, #find_by_id, #find_field, #find_link

Constructor Details

#initialize(driver, node) ⇒ Node

Returns a new instance of Node.



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

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

Instance Attribute Details

#driverObject (readonly)

Returns the value of attribute driver.



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

def driver
  @driver
end

#nodeObject (readonly)

Returns the value of attribute node.



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

def node
  @node
end

Instance Method Details

#[](name) ⇒ Object

Raises:

  • (NotImplementedError)


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

def [](name)
  raise NotImplementedError
end

#clickObject

Raises:

  • (NotImplementedError)


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

def click
  raise NotImplementedError
end

#drag_to(element) ⇒ Object

Raises:

  • (NotImplementedError)


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

def drag_to(element)
  raise NotImplementedError
end

#pathObject



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

def path
  raise NotSupportedByDriverError
end

#select(option) ⇒ Object

Raises:

  • (NotImplementedError)


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

def select(option)
  raise NotImplementedError
end

#set(value) ⇒ Object

Raises:

  • (NotImplementedError)


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

def set(value)
  raise NotImplementedError
end

#tag_nameObject

Raises:

  • (NotImplementedError)


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

def tag_name
  raise NotImplementedError
end

#textObject

Raises:

  • (NotImplementedError)


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

def text
  raise NotImplementedError
end

#trigger(event) ⇒ Object



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

def trigger(event)
  raise NotSupportedByDriverError
end

#unselect(option) ⇒ Object

Raises:

  • (NotImplementedError)


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

def unselect(option)
  raise NotImplementedError
end

#valueObject



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

def value
  self[:value]
end

#visible?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def visible?
  raise NotImplementedError
end