123456789_123456789_123456789_123456789_123456789_

Class: Capybara::Driver::Node

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/capybara/driver/node.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(driver, native, initial_cache = {}) ⇒ Node

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 8
def initialize(driver, native, initial_cache = {})
  @driver = driver
  @native = native
  @initial_cache = initial_cache
end

Instance Attribute Details

#checked?Boolean (readonly)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 96
def checked?
  raise NotImplementedError
end

#disabled?Boolean (readonly)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 104
def disabled?
  raise NotImplementedError
end

#driver (readonly)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 6
attr_reader :driver, :native, :initial_cache

#initial_cache (readonly)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 6
attr_reader :driver, :native, :initial_cache

#multiple?Boolean (readonly)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 112
def multiple?
  !!self[:multiple]
end

#native (readonly)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 6
attr_reader :driver, :native, :initial_cache

#obscured?Boolean (readonly)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 92
def obscured?
  raise NotImplementedError
end

#readonly?Boolean (readonly)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 108
def readonly?
  !!self[:readonly]
end

#selected?Boolean (readonly)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 100
def selected?
  raise NotImplementedError
end

#visible?Boolean (readonly)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 88
def visible?
  raise NotImplementedError
end

Instance Method Details

#==(other)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 138
def ==(other)
  eql?(other) || (other.respond_to?(:native) && native == other.native)
end

#[](name)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 22
def [](name)
  raise NotImplementedError
end

#all_text

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 14
def all_text
  raise NotImplementedError
end

#click(keys = [], **options)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 48
def click(keys = [], **options)
  raise NotImplementedError
end

#double_click(keys = [], **options)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 56
def double_click(keys = [], **options)
  raise NotImplementedError
end

#drag_to(element, **options)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 68
def drag_to(element, **options)
  raise NotImplementedError
end

#drop(*args)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 72
def drop(*args)
  raise NotImplementedError
end

#hover

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 64
def hover
  raise NotImplementedError
end

#inspect

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 132
def inspect
  %(#<#{self.class} tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError
  %(#<#{self.class} tag="#{tag_name}">)
end

#path

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 120
def path
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#path'
end

#rect

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 116
def rect
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#rect'
end

#right_click(keys = [], **options)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 52
def right_click(keys = [], **options)
  raise NotImplementedError
end

#scroll_by(x, y)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 76
def scroll_by(x, y)
  raise NotImplementedError
end

#scroll_to(element, alignment, position = nil)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 80
def scroll_to(element, alignment, position = nil)
  raise NotImplementedError
end

#select_option

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 40
def select_option
  raise NotImplementedError
end

#send_keys(*args)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 60
def send_keys(*args)
  raise NotImplementedError
end

#set(value, **options)

Parameters:

  • value (String, Array)

    Array is only allowed if node has ‘multiple’ attribute

  • options (Hash)

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

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 36
def set(value, **options)
  raise NotImplementedError
end

#shadow_root

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 128
def shadow_root
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#shadow_root'
end

#style(styles)

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 30
def style(styles)
  raise NotImplementedError
end

#tag_name

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 84
def tag_name
  raise NotImplementedError
end

#trigger(event)

[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 124
def trigger(event)
  raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger'
end

#unselect_option

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 44
def unselect_option
  raise NotImplementedError
end

#value

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 26
def value
  raise NotImplementedError
end

#visible_text

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/capybara/driver/node.rb', line 18
def visible_text
  raise NotImplementedError
end