Sha256: 087931147ba1aaa74037ad2b865f9c39264a6285661251061026f9ec162cb11c

Contents?: true

Size: 693 Bytes

Versions: 6

Compression:

Stored size: 693 Bytes

Contents

module Appium::Capybara
  class Appium::Capybara::Node < Capybara::Selenium::Node
    def value
      native.value
    end

    def label
      native.label
    end

    def name
      native.name
    end

    def set(value)
      native.clear
      send_keys(value)
    end

    def send_keys(value)
      native.send_keys(value.to_s)
    end

    def long_press
      action = Appium::TouchAction.new
      action.long_press(element: native, duration: 2000)
      action.perform
    end

    def find_custom(finder, locator)
      native.find_elements(finder, locator).map { |n| self.class.new(driver, n) }
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
appium_capybara-1.4.1 lib/appium_capybara/driver/appium/node.rb
appium_capybara-1.4.0 lib/appium_capybara/driver/appium/node.rb
appium_capybara-1.3.0 lib/appium_capybara/driver/appium/node.rb
appium_capybara-1.2.1 lib/appium_capybara/driver/appium/node.rb
appium_capybara-1.2.0 lib/appium_capybara/driver/appium/node.rb
appium_capybara-1.1.0 lib/appium_capybara/driver/appium/node.rb