Sha256: 916b145315e35fb0157846ef7ed53bf297f7c43cbb93e4b8ee8a809ca9cdf3ea

Contents?: true

Size: 797 Bytes

Versions: 4

Compression:

Stored size: 797 Bytes

Contents

module Appium
  module Core
    module Ios
      module Uiautomation
        # @private
        # class_eval inside a method because class Selenium::WebDriver::Element
        # will trigger as soon as the file is required. in contrast a method
        # will trigger only when invoked.
        def self.patch_webdriver_element
          ::Selenium::WebDriver::Element.class_eval do
            # Cross platform way of entering text into a textfield
            def type(text, driver = $driver)
              driver.execute_script %(au.getElement('#{ref}').setValue('#{text}');)
            end # def type
          end # Selenium::WebDriver::Element.class_eval
        end # def patch_webdriver_element
      end # module Uiautomation
    end # module Ios
  end # module Core
end # module Appium

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appium_lib-9.7.5 lib/appium_lib/core/ios/uiautomation/patch.rb
appium_lib-9.7.4 lib/appium_lib/core/ios/uiautomation/patch.rb
appium_lib-9.7.3 lib/appium_lib/core/ios/uiautomation/patch.rb
appium_lib-9.7.2 lib/appium_lib/core/ios/uiautomation/patch.rb