RubyDoc.info:
Class: Capybara::Driver::Node
– Documentation for jnicklas/capybara (master)
– RubyDoc.info (original) (raw)
Inherits:
Object
Defined in:
lib/capybara/driver/node.rb
Instance Attribute Summary collapse
Instance Method Summarycollapse
- #==(other) ⇒ Object
- #[](name) ⇒ Object
- #all_text ⇒ Object
- #checked? ⇒ Boolean
- #click(keys = [], **options) ⇒ Object
- #disabled? ⇒ Boolean
- #double_click(keys = [], **options) ⇒ Object
- #drag_to(element, **options) ⇒ Object
- #drop(*args) ⇒ Object
- #hover ⇒ Object
- #initialize(driver, native, initial_cache = {}) ⇒ Node constructor
A new instance of Node.
- #inspect ⇒ Object
- #multiple? ⇒ Boolean
- #obscured? ⇒ Boolean
- #path ⇒ Object
- #readonly? ⇒ Boolean
- #rect ⇒ Object
- #right_click(keys = [], **options) ⇒ Object
- #scroll_by(x, y) ⇒ Object
- #scroll_to(element, alignment, position = nil) ⇒ Object
- #select_option ⇒ Object
- #selected? ⇒ Boolean
- #send_keys(*args) ⇒ Object
- #set(value, **options) ⇒ Object
- #shadow_root ⇒ Object
- #style(styles) ⇒ Object
- #tag_name ⇒ Object
- #trigger(event) ⇒ Object
- #unselect_option ⇒ Object
- #value ⇒ Object
- #visible? ⇒ Boolean
- #visible_text ⇒ Object
Constructor Details
#initialize(driver, native, initial_cache = {}) ⇒ Node
Returns a new instance of Node.
8 9 10 11 12 |
# 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
#driver ⇒ Object
Returns the value of attribute driver.
6 7 8 |
# File 'lib/capybara/driver/node.rb', line 6 def driver @driver end |
#initial_cache ⇒ Object
Returns the value of attribute initial_cache.
6 7 8 |
# File 'lib/capybara/driver/node.rb', line 6 def initial_cache @initial_cache end |
#native ⇒ Object
Returns the value of attribute native.
6 7 8 |
# File 'lib/capybara/driver/node.rb', line 6 def native @native end |
Instance Method Details
#==(other) ⇒ Object
| 138 139 140 | # File 'lib/capybara/driver/node.rb', line 138 def ==(other) eql?(other) || (other.respond_to?(:native) && native == other.native) end |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
#[](name) ⇒ Object
22 23 24 |
# File 'lib/capybara/driver/node.rb', line 22 def [](name) raise NotImplementedError end |
#all_text ⇒ Object
14 15 16 |
# File 'lib/capybara/driver/node.rb', line 14 def all_text raise NotImplementedError end |
#checked? ⇒ Boolean
96 97 98 |
# File 'lib/capybara/driver/node.rb', line 96 def checked? raise NotImplementedError end |
#click(keys = [], **options) ⇒ Object
48 49 50 |
# File 'lib/capybara/driver/node.rb', line 48 def click(keys = [], **options) raise NotImplementedError end |
#disabled? ⇒ Boolean
104 105 106 |
# File 'lib/capybara/driver/node.rb', line 104 def disabled? raise NotImplementedError end |
#double_click(keys = [], **options) ⇒ Object
56 57 58 |
# File 'lib/capybara/driver/node.rb', line 56 def double_click(keys = [], **options) raise NotImplementedError end |
#drag_to(element, **options) ⇒ Object
68 69 70 |
# File 'lib/capybara/driver/node.rb', line 68 def drag_to(element, **options) raise NotImplementedError end |
#drop(*args) ⇒ Object
72 73 74 |
# File 'lib/capybara/driver/node.rb', line 72 def drop(*args) raise NotImplementedError end |
#hover ⇒ Object
64 65 66 |
# File 'lib/capybara/driver/node.rb', line 64 def hover raise NotImplementedError end |
#inspect ⇒ Object
132 133 134 135 136 |
# 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 |
#multiple? ⇒ Boolean
112 113 114 |
# File 'lib/capybara/driver/node.rb', line 112 def multiple? !!self[:multiple] end |
#obscured? ⇒ Boolean
92 93 94 |
# File 'lib/capybara/driver/node.rb', line 92 def obscured? raise NotImplementedError end |
#path ⇒ Object
120 121 122 |
# File 'lib/capybara/driver/node.rb', line 120 def path raise NotSupportedByDriverError, 'Capybara::Driver::Node#path' end |
#readonly? ⇒ Boolean
108 109 110 |
# File 'lib/capybara/driver/node.rb', line 108 def readonly? !!self[:readonly] end |
#rect ⇒ Object
116 117 118 |
# File 'lib/capybara/driver/node.rb', line 116 def rect raise NotSupportedByDriverError, 'Capybara::Driver::Node#rect' end |
#right_click(keys = [], **options) ⇒ Object
52 53 54 |
# File 'lib/capybara/driver/node.rb', line 52 def right_click(keys = [], **options) raise NotImplementedError end |
76 77 78 |
# File 'lib/capybara/driver/node.rb', line 76 def scroll_by(x, y) raise NotImplementedError end |
80 81 82 |
# File 'lib/capybara/driver/node.rb', line 80 def scroll_to(element, alignment, position = nil) raise NotImplementedError end |
#select_option ⇒ Object
40 41 42 |
# File 'lib/capybara/driver/node.rb', line 40 def select_option raise NotImplementedError end |
#selected? ⇒ Boolean
100 101 102 |
# File 'lib/capybara/driver/node.rb', line 100 def selected? raise NotImplementedError end |
#send_keys(*args) ⇒ Object
60 61 62 |
# File 'lib/capybara/driver/node.rb', line 60 def send_keys(*args) raise NotImplementedError end |
#set(value, **options) ⇒ Object
36 37 38 |
# File 'lib/capybara/driver/node.rb', line 36 def set(value, **options) raise NotImplementedError end |
#shadow_root ⇒ Object
128 129 130 |
# File 'lib/capybara/driver/node.rb', line 128 def shadow_root raise NotSupportedByDriverError, 'Capybara::Driver::Node#shadow_root' end |
#style(styles) ⇒ Object
30 31 32 |
# File 'lib/capybara/driver/node.rb', line 30 def style(styles) raise NotImplementedError end |
#tag_name ⇒ Object
84 85 86 |
# File 'lib/capybara/driver/node.rb', line 84 def tag_name raise NotImplementedError end |
#trigger(event) ⇒ Object
124 125 126 |
# File 'lib/capybara/driver/node.rb', line 124 def trigger(event) raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger' end |
#unselect_option ⇒ Object
44 45 46 |
# File 'lib/capybara/driver/node.rb', line 44 def unselect_option raise NotImplementedError end |
#value ⇒ Object
26 27 28 |
# File 'lib/capybara/driver/node.rb', line 26 def value raise NotImplementedError end |
#visible? ⇒ Boolean
88 89 90 |
# File 'lib/capybara/driver/node.rb', line 88 def visible? raise NotImplementedError end |
#visible_text ⇒ Object
18 19 20 |
# File 'lib/capybara/driver/node.rb', line 18 def visible_text raise NotImplementedError end |