Class: Appium::Capybara::Node

Inherits:
Capybara::Selenium::Node
  • Object
show all
Defined in:
lib/appium_capybara/driver/appium/node.rb

Instance Method Summary collapse

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

#inspectObject



27
28
29
# File 'lib/appium_capybara/driver/appium/node.rb', line 27

def inspect
  %(#<#{self.class} name="#{name}">)
end

#labelObject



3
4
5
# File 'lib/appium_capybara/driver/appium/node.rb', line 3

def label
  native.label
end

#long_pressObject



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

#nameObject



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, _options = {})
  native.clear
  send_keys(value)
end