Class: Appium::Capybara::Node
- Inherits:
-
Capybara::Selenium::Node
- Object
- Capybara::Selenium::Node
- Appium::Capybara::Node
- Defined in:
- lib/appium_capybara/driver/appium/node.rb
Instance Method Summary collapse
- #find_custom(finder, locator) ⇒ Object
- #inspect ⇒ Object
- #label ⇒ Object
- #long_press ⇒ Object
- #name ⇒ Object
-
#set(value, _options = {}) ⇒ Object
Override.
Instance Method Details
#find_custom(finder, locator) ⇒ Object
23 24 25 |
# File 'lib/appium_capybara/driver/appium/node.rb', line 23 def find_custom(finder, locator) native.find_elements(finder, locator).map { |n| self.class.new(driver, n) } end |
#inspect ⇒ Object
27 28 29 |
# File 'lib/appium_capybara/driver/appium/node.rb', line 27 def inspect %(#<#{self.class} name="#{name}">) end |
#label ⇒ Object
3 4 5 |
# File 'lib/appium_capybara/driver/appium/node.rb', line 3 def label native.label end |
#long_press ⇒ Object
17 18 19 20 21 |
# File 'lib/appium_capybara/driver/appium/node.rb', line 17 def long_press action = Appium::TouchAction.new action.long_press(element: native, duration: 2000) action.perform end |
#name ⇒ Object
7 8 9 |
# File 'lib/appium_capybara/driver/appium/node.rb', line 7 def name native.name end |
#set(value, _options = {}) ⇒ Object
Override
12 13 14 15 |
# File 'lib/appium_capybara/driver/appium/node.rb', line 12 def set(value, = {}) native.clear send_keys(value) end |