docs/ios_docs.md in appium_lib-9.5.0 vs docs/ios_docs.md in appium_lib-9.6.0

- old
+ new

@@ -1,6 +1,6 @@ -##### [load_settings](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L76) +##### [load_settings](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L91) > def self.load_settings(opts = {}) Load arbitrary text ([toml format](https://github.com/toml-lang/toml)) The toml is parsed by https://github.com/fbernier/tomlrb . @@ -25,11 +25,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[hash] the symbolized hash with updated :app and :require keys -- -##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L112) +##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L127) > def self.load_settings(opts = {}) Load arbitrary text ([toml format](https://github.com/toml-lang/toml)) The toml is parsed by https://github.com/fbernier/tomlrb . @@ -55,11 +55,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[hash] the symbolized hash with updated :app and :require keys -- -##### [expand_required_files](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L118) +##### [expand_required_files](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L133) > def self.expand_required_files(base_dir, file_paths) @@ -73,24 +73,24 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array] list of require files as an array, nil if require doesn't exist -- -##### [symbolize_keys](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L150) +##### [symbolize_keys](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L165) > def self.symbolize_keys(hash) convert all keys (including nested) to symbols based on deep_symbolize_keys & deep_transform_keys from rails https://github.com/rails/docrails/blob/a3b1105ada3da64acfa3843b164b14b734456a50/activesupport/lib/active_support/core_ext/hash/keys.rb#L84 -- -##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L171) +##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L186) -> def self.promote_singleton_appium_methods(modules) +> def self.promote_singleton_appium_methods(modules, driver = $driver) This method is intended to work with page objects that share a common module. For example, Page::HomePage, Page::SignIn those could be promoted on with Appium.promote_singleton_appium_methods Page @@ -102,13 +102,13 @@ that module are promoted on. otherwise, the array of modules will be used as the promotion target. -- -##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L224) +##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L239) -> def self.promote_appium_methods(class_array) +> def self.promote_appium_methods(class_array, driver = $driver) Promote appium methods to class instance methods To promote methods to all classes: @@ -132,11 +132,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Class>] class_array - An array of classes -- -##### [selenium_webdriver_version_more?](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L251) +##### [selenium_webdriver_version_more?](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L266) > def self.selenium_webdriver_version_more?(version) @@ -144,11 +144,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] -- -##### [init_caps_for_appium](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L262) +##### [init_caps_for_appium](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L277) > def self.init_caps_for_appium(opts_caps = {}) @@ -162,51 +162,51 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[::Selenium::WebDriver::Remote::W3C::Capabilities] Return instance of Appium::Driver::Capabilities inherited ::Selenium::WebDriver::Remote::W3C::Capabilities -- -##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L275) +##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L290) > def global_webdriver_http_sleep The amount to sleep in seconds before every webdriver http call. -- -##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L275) +##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L290) > def global_webdriver_http_sleep=(value) The amount to sleep in seconds before every webdriver http call. -- -##### [caps](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L277) +##### [caps](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L292) > def caps Selenium webdriver capabilities -- -##### [custom_url](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L279) +##### [custom_url](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L294) > def custom_url Custom URL for the selenium server -- -##### [export_session](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L281) +##### [export_session](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L296) > def export_session Export session id to textfile in /tmp for 3rd party tools -- -##### [default_wait](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L286) +##### [default_wait](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L301) > def default_wait Default wait time for elements to appear Returns the default client side wait. @@ -216,84 +216,84 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] -- -##### [sauce_username](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L288) +##### [sauce_username](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L303) > def sauce_username Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV. -- -##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L290) +##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L305) > def sauce_access_key Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV. -- -##### [sauce_endpoint](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L292) +##### [sauce_endpoint](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L307) > def sauce_endpoint Override the Sauce Appium endpoint to allow e.g. TestObject tests -- -##### [appium_port](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L294) +##### [appium_port](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L309) > def appium_port Appium's server port -- -##### [appium_device](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L296) +##### [appium_device](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L311) > def appium_device Device type to request from the appium server -- -##### [automation_name](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L299) +##### [automation_name](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L314) > def automation_name Automation name sent to appium server or received from server If automation_name is nil, it is not set both client side and server side. -- -##### [appium_server_status](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L301) +##### [appium_server_status](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L316) > def appium_server_status Appium's server version -- -##### [appium_debug](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L303) +##### [appium_debug](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L318) > def appium_debug Boolean debug mode for the Appium Ruby bindings -- -##### [listener](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L305) +##### [listener](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L320) > def listener instance of AbstractEventListener for logging support -- -##### [driver](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L308) +##### [driver](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L323) > def driver Returns the driver @@ -301,11 +301,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] the driver -- -##### [http_client](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L311) +##### [http_client](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L326) > def http_client Return http client called in start_driver() @@ -313,11 +313,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver::Remote::Http::Default] the http client -- -##### [appium_wait_timeout](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L316) +##### [appium_wait_timeout](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L331) > def appium_wait_timeout Return a time wait timeout Wait time for ::Appium::Common.wait or ::Appium::Common.wait_true. @@ -327,11 +327,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] -- -##### [appium_wait_interval](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L321) +##### [appium_wait_interval](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L336) > def appium_wait_interval Return a time wait timeout Wait interval time for ::Appium::Common.wait or ::Appium::Common.wait_true. @@ -341,43 +341,46 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] -- -##### [initialize](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L361) +##### [initialize](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L390) -> def initialize(opts = {}) +> def initialize(opts = {}, global_driver = true) -Creates a new driver +Creates a new driver. The driver is defined as global scope by default. +We can avoid defining global driver. __Parameters:__ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Object] opts - A hash containing various options. +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Bool] global_driver - A bool require global driver before initialize. + __Returns:__ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] -- -##### [set_appium_lib_specific_values](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L427) +##### [set_appium_lib_specific_values](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L468) > def set_appium_lib_specific_values(appium_lib_opts) -- -##### [driver_attributes](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L453) +##### [driver_attributes](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L494) > def driver_attributes Returns a hash of the driver attributes -- -##### [device_is_android?](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L472) +##### [device_is_android?](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L513) > def device_is_android? @@ -385,11 +388,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] -- -##### [automation_name_is_xcuitest?](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L478) +##### [automation_name_is_xcuitest?](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L519) > def automation_name_is_xcuitest? Return true if automationName is 'XCUITest' @@ -397,11 +400,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] -- -##### [automation_name_is_uiautomator2?](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L484) +##### [automation_name_is_uiautomator2?](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L525) > def automation_name_is_uiautomator2? Return true if automationName is 'uiautomator2' @@ -409,12 +412,24 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] -- -##### [check_server_version_xcuitest](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L491) +##### [automation_name_is_espresso?](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L531) +> def automation_name_is_espresso? + +Return true if automationName is 'Espresso' + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] + +-- + +##### [check_server_version_xcuitest](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L538) + > def check_server_version_xcuitest Return true if the target Appium server is over REQUIRED_VERSION_XCUITEST. If the Appium server is under REQUIRED_VERSION_XCUITEST, then error is raised. @@ -422,11 +437,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] -- -##### [appium_server_version](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L518) +##### [appium_server_version](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L565) > def appium_server_version Returns the server's version info @@ -449,11 +464,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] -- -##### [appium_client_version](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L539) +##### [appium_client_version](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L586) > def appium_client_version Returns the client's version info @@ -467,11 +482,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] -- -##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L551) +##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L598) > def self.absolute_app_path(opts) Converts app_path to an absolute path. @@ -484,11 +499,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] APP_PATH as an absolute path -- -##### [server_url](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L584) +##### [server_url](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L631) > def server_url Get the server url @@ -496,11 +511,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] the server url -- -##### [restart](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L595) +##### [restart](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L642) > def restart Restarts the driver @@ -508,11 +523,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] the driver -- -##### [screenshot](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L606) +##### [screenshot](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L653) > def screenshot(png_save_path) Takes a png screenshot and saves to the target path. @@ -526,11 +541,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nil] -- -##### [driver_quit](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L613) +##### [driver_quit](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L660) > def driver_quit Quits the driver @@ -538,12 +553,25 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [start_driver](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L646) +##### [quit_driver](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L668) +> def driver_quit + +Quits the driver +Alias for driver_quit + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] + +-- + +##### [start_driver](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L696) + > def start_driver(http_client_ops = { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 }) Creates a new global driver and quits the old one if it exists. You can customise http_client as the following @@ -555,19 +583,27 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver] the new global driver -- -##### [no_wait](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L686) +##### [set_implicit_wait](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L736) +> def set_implicit_wait(wait) + +To ignore error for Espresso Driver + +-- + +##### [no_wait](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L746) + > def no_wait Set implicit wait to zero. -- -##### [set_wait](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L700) +##### [set_wait](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L760) > def set_wait(timeout = nil) Set implicit wait. Default to @default_wait. @@ -585,11 +621,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [exists](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L717) +##### [exists](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L777) > def exists(pre_check = 0, post_check = @default_wait) Returns existence of element. @@ -609,11 +645,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] -- -##### [execute_script](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L741) +##### [execute_script](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L801) > def execute_script(script, *args) The same as @driver.execute_script @@ -627,11 +663,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Object] -- -##### [find_elements](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L763) +##### [find_elements](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L823) > def find_elements(*args) Calls @driver.find_elements_with_appium @@ -653,11 +689,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] Array is empty when no elements are found. -- -##### [find_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L778) +##### [find_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L838) > def find_element(*args) Calls @driver.find_element @@ -674,11 +710,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [set_location](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L791) +##### [set_location](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L851) > def set_location(opts = {}) Calls @driver.set_location @@ -690,11 +726,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver::Location] the location constructed by the selenium webdriver -- -##### [x](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L801) +##### [x](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L861) > def x Quit the driver and Pry. quit and exit are reserved by Pry. @@ -703,28 +739,28 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [write_session_id](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L808) +##### [write_session_id](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L868) > def write_session_id(session_id) -- -##### [set_automation_name_if_nil](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/driver.rb#L817) +##### [set_automation_name_if_nil](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/driver.rb#L877) > def set_automation_name_if_nil If "automationName" is set only server side, this method set "automationName" attribute into @automation_name. Since @automation_name is set only client side before start_driver is called. -- -##### [logger=](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/logger.rb#L18) +##### [logger=](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/logger.rb#L18) > def logger=(value) Sets the attribute logger @@ -732,39 +768,39 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value - the value to set the attribute logger to. -- -##### [logger](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/logger.rb#L22) +##### [logger](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/logger.rb#L22) > def logger -- -##### [app_strings](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L7) +##### [app_strings](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L7) > def app_strings Return the hash of all localization strings. ```ruby app_strings #=> "TransitionsTitle"=>"Transitions", "WebTitle"=>"Web" ``` -- -##### [background_app](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L13) +##### [background_app](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L13) > def background_app Backgrounds the app for a set number of seconds. This is a blocking application -- -##### [current_activity](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L24) +##### [current_activity](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L24) > def current_activity Get current activity name ```ruby @@ -775,11 +811,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] An activity name -- -##### [current_package](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L32) +##### [current_package](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L32) > def current_package Get current package name ```ruby @@ -790,11 +826,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] A package name -- -##### [get_system_bars](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L40) +##### [get_system_bars](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L40) > def get_system_bars Get system bar's information ```ruby @@ -805,11 +841,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] System bar -- -##### [get_display_density](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L48) +##### [get_display_density](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L48) > def get_display_density Get connected device's density. ```ruby @@ -820,11 +856,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] The size of density -- -##### [is_keyboard_shown](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L56) +##### [is_keyboard_shown](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L56) > def is_keyboard_shown Get whether keyboard is displayed or not. ```ruby @@ -835,51 +871,51 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Bool] Return true if keyboard is shown. Return false if keyboard is hidden. -- -##### [launch_app](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L64) +##### [launch_app](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L64) > def launch_app Start the simulator and application configured with desired capabilities -- -##### [reset](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L67) +##### [reset](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L67) > def reset Reset the device, relaunching the application. -- -##### [shake](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L70) +##### [shake](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L70) > def shake Cause the device to shake -- -##### [toggle_flight_mode](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L73) +##### [toggle_flight_mode](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L73) > def toggle_flight_mode Toggle flight mode on or off -- -##### [device_locked?](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L76) +##### [device_locked?](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L76) > def device_locked? -- -##### [hide_keyboard](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L78) +##### [hide_keyboard](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L78) > def hide_keyboard Hide the onscreen keyboard @@ -892,11 +928,11 @@ XCUITest ignore this argument. Default for iOS is `:pressKey`. Default for Android is `:tapOutside`. -- -##### [press_keycode](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L91) +##### [press_keycode](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L91) > def press_keycode Press keycode on the device. http://developer.android.com/reference/android/view/KeyEvent.html @@ -907,11 +943,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] metastate - The state the metakeys should be in when pressing the key. -- -##### [long_press_keycode](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L97) +##### [long_press_keycode](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L97) > def long_press_keycode Long press keycode on the device. http://developer.android.com/reference/android/view/KeyEvent.html @@ -922,11 +958,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] metastate - The state the metakeys should be in when long pressing the key. -- -##### [push_file](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L103) +##### [push_file](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L103) > def push_file Place a file in a specific location on the device. @@ -936,11 +972,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] data - Raw file data to be sent to the device. -- -##### [pull_file](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L108) +##### [pull_file](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L108) > def pull_file Retrieve a file from the device. This can retrieve an absolute path or a path relative to the installed app (iOS only). @@ -953,11 +989,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] path - Either an absolute path OR, for iOS devices, a path relative to the app, as described. -- -##### [pull_folder](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L118) +##### [pull_folder](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L118) > def pull_folder Retrieve a folder from the device. ```ruby @@ -968,11 +1004,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] path - absolute path to the folder -- -##### [touch_id](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L126) +##### [touch_id](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L126) > def touch_id iOS only; Simulate Touch ID with either valid (match == true) or invalid (match == false) fingerprint. ```ruby @@ -985,19 +1021,19 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean] match - fingerprint validity Defaults to true. -- -##### [toggle_touch_id_enrollment](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L135) +##### [toggle_touch_id_enrollment](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L135) > def toggle_touch_id_enrollment iOS Simulator only: Toggle touch id enrollment on an iOS Simulator. -- -##### [end_coverage](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L138) +##### [end_coverage](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L138) > def end_coverage Android only; Ends the test coverage and writes the results to the given path on device. @@ -1007,19 +1043,19 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] intent - Intent to broadcast when ending coverage. -- -##### [get_settings](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L143) +##### [get_settings](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L143) > def get_settings Get appium Settings for current test session -- -##### [update_settings](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L146) +##### [update_settings](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L146) > def update_settings Update appium Settings for current test session @@ -1027,11 +1063,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] settings - Settings to update, keys are settings, values to value to set each setting to -- -##### [start_activity](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L150) +##### [start_activity](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L150) > def start_activity Start a new activity within the current app or launch a new app and start the target activity. @@ -1041,20 +1077,20 @@ app_activity: '.accessibility.AccessibilityNodeProviderActivity' ``` -- -##### [get_network_connection](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L164) +##### [get_network_connection](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L164) > def get_network_connection Get the device network connection current status See set_network_connection method for return value -- -##### [set_network_connection](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L168) +##### [set_network_connection](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L168) > def set_network_connection Set the device network connection mode Value (Alias) | Data | Wifi | Airplane Mode @@ -1069,11 +1105,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] path - Bit mask that represent the network mode -- -##### [set_immediate_value](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L181) +##### [set_immediate_value](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L181) > def set_immediate_value Set the value to element directly for iOS; setValue is called in XCUITest instead because XCUITest doesn't provide set value directly. @@ -1083,11 +1119,11 @@ set_immediate_value element, 'hello' ``` -- -##### [get_performance_data_types](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L190) +##### [get_performance_data_types](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L190) > def get_performance_data_types Get the information type of the system state which is supported to read such as cpu, memory, network, battery via adb commands. @@ -1097,27 +1133,27 @@ get_performance_data_types #=> ["cpuinfo", "batteryinfo", "networkinfo", "memoryinfo"] ``` -- -##### [extend_search_contexts](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L453) +##### [extend_search_contexts](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L443) > def extend_search_contexts -- -##### [find_element_with_appium](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L453) +##### [find_element_with_appium](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L443) > def find_element_with_appium -- -##### [find_elements_with_appium](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L453) +##### [find_elements_with_appium](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L443) > def find_elements_with_appium find_element/s_with_appium with their accessibility_id @@ -1125,27 +1161,27 @@ find_elements :accessibility_id, 'Animation' ``` -- -##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L484) +##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L474) > def add_touch_actions -- -##### [add_ime_actions](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L507) +##### [add_ime_actions](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L497) > def add_ime_actions -- -##### [set_context](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L582) +##### [set_context](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L572) > def set_context Change the context to the given context. ```ruby @@ -1156,11 +1192,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] The - context to change to -- -##### [current_context](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L590) +##### [current_context](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L580) > def current_context @@ -1168,11 +1204,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] The context currently being used. -- -##### [available_contexts](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L593) +##### [available_contexts](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L583) > def available_contexts @@ -1180,11 +1216,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<String>] All usable contexts, as an array of strings. -- -##### [within_context](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L604) +##### [within_context](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L594) > def within_context(context) Perform a block within the given context, then switch back to the starting context. ```ruby @@ -1197,125 +1233,163 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] context - The context to switch to for the duration of the block. -- -##### [switch_to_default_context](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/device.rb#L617) +##### [switch_to_default_context](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/device.rb#L607) > def switch_to_default_context Change to the default context. This is equivalent to `set_context nil`. -- -##### [pinch](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L28) +##### [pinch](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L53) -> def pinch(percentage = 25, auto_perform = true) +> def pinch(percentage = 25, auto_perform = true, driver = $driver) Convenience method for pinching the screen. Places two fingers at the edges of the screen and brings them together. ```ruby -action = pinch 75 #=> Pinch the screen from the top right and bottom left corners +pinch 75 #=> Pinch the screen from the top right and bottom left corners +``` + +Without auto_perform + +```ruby +action = pinch 75, false #=> Pinch the screen from the top right and bottom left corners action.perform #=> to 25% of its size. ``` +With driver + +```ruby +driver = Appium::Driver.new(opts, false).start_driver +pinch 75, true, driver #=> Pinch the screen from the top right and bottom left corners +``` + __Parameters:__ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[int] percentage - The percent size by which to shrink the screen when pinched. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[boolean] auto_perform - Whether to perform the action immediately (default true) +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver) + -- -##### [zoom](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L57) +##### [zoom](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L96) -> def zoom(percentage = 200, auto_perform = true) +> def zoom(percentage = 200, auto_perform = true, driver = $driver) Convenience method for zooming the screen. Places two fingers at the edges of the screen and brings them together. ```ruby action = zoom 200 #=> Zoom in the screen from the center until it doubles in size. -action.perform ``` +Without auto_perform + +```ruby +action = zoom 200, false #=> Zoom in the screen from the center until it doubles in size. +action.perform #=> to 25% of its size. +``` + +With driver + +```ruby +driver = Appium::Driver.new(opts, false).start_driver +pinch 200, true, driver #=> Zoom in the screen from the center until it doubles in size. +``` + __Parameters:__ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[int] percentage - The percent size by which to shrink the screen when pinched. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[boolean] auto_perform - Whether to perform the action immediately (default true) +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver) + -- -##### [pinch_for_xcuitest](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L79) +##### [pinch_for_xcuitest](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L118) -> def pinch_for_xcuitest(rate) +> def pinch_for_xcuitest(rate, driver) -- -##### [pinch_android](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L94) +##### [pinch_android](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L133) > def pinch_android(rate) -- -##### [pinch_ios](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L108) +##### [pinch_ios](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L147) > def pinch_ios(rate) -- -##### [zoom_for_xcuitest](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L122) +##### [zoom_for_xcuitest](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L161) -> def zoom_for_xcuitest(rate) +> def zoom_for_xcuitest(rate, driver) -- -##### [zoom_android](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L137) +##### [zoom_android](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L176) > def zoom_android(rate) -- -##### [zoom_ios](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L151) +##### [zoom_ios](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L190) > def zoom_ios(rate) -- -##### [actions](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L166) +##### [actions](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L205) > def actions self -- -##### [initialize](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L169) +##### [driver](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L205) -> def initialize +> def driver -Create a new multi-action +self +-- + +##### [initialize](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L208) + +> def initialize(driver = $driver) + +Create a new multi-action with Driver + __Returns:__ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[MultiTouch] a new instance of MultiTouch -- -##### [add](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L175) +##### [add](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L215) > def add(chain) Add a touch_action to be performed @@ -1323,43 +1397,43 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TouchAction] chain - The action to add to the chain -- -##### [perform](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/multi_touch.rb#L180) +##### [perform](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/multi_touch.rb#L220) > def perform Ask Appium to perform the actions -- -##### [ACTIONS](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L22) +##### [ACTIONS](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L30) > ACTIONS = [:move_to, :long_press, :double_tap, :two_finger_tap, :press, :release, :tap, :wait, :perform].freeze -- -##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L23) +##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L31) > COMPLEX_ACTIONS = [:swipe].freeze -- -##### [actions](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L37) +##### [actions](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L45) > def actions Returns the value of attribute actions -- -##### [initialize](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L39) +##### [initialize](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L47) > def initialize @@ -1367,11 +1441,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TouchAction] a new instance of TouchAction -- -##### [move_to](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L50) +##### [move_to](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L58) > def move_to(opts) Move to the given co-ordinates. @@ -1381,11 +1455,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [long_press](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L64) +##### [long_press](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L72) > def long_press(opts) Press down for a specific duration. Alternatively, you can use `press(...).wait(...).release()` instead of `long_press` if duration doesn't work well. @@ -1402,11 +1476,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] duration - a customizable set of options -- -##### [press](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L76) +##### [press](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L84) > def press(opts) Press a finger onto the screen. Finger will stay down until you call `release`. @@ -1415,11 +1489,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [release](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L87) +##### [release](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L95) > def release(opts = nil) Remove a finger from the screen. @@ -1427,11 +1501,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [tap](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L99) +##### [tap](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L107) > def tap(opts) Touch a point on the screen. Alternatively, you can use `press(...).release.perform` instead of `tap(...).perform`. @@ -1440,11 +1514,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [double_tap](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L112) +##### [double_tap](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L120) > def double_tap(opts) Double tap an element on the screen @@ -1452,11 +1526,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L123) +##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L131) > def two_finger_tap(opts) Two finger tap an element on the screen @@ -1464,11 +1538,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [wait](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L131) +##### [wait](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L139) > def wait(milliseconds) Pause for a number of milliseconds before the next action @@ -1476,11 +1550,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[integer] milliseconds - Number of milliseconds to pause for -- -##### [swipe](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L154) +##### [swipe](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L162) > def swipe(opts, ele = nil) Convenience method to peform a swipe. @@ -1497,51 +1571,51 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [perform](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L179) +##### [perform](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L187) -> def perform +> def perform(driver = $driver) Ask the driver to perform all actions in this action chain. -- -##### [cancel](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L186) +##### [cancel](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L194) -> def cancel +> def cancel(driver = $driver) Does nothing, currently. -- -##### [swipe_coordinates](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L192) +##### [swipe_coordinates](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L201) -> def swipe_coordinates(end_x: nil, end_y: nil, offset_x: nil, offset_y: nil) +> def swipe_coordinates(end_x: nil, end_y: nil, offset_x: nil, offset_y: nil, driver: $driver) +Visible for testing - -- -##### [chain_method](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L210) +##### [chain_method](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L219) > def chain_method(method, args = nil) -- -##### [args_with_ele_ref](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/device/touch_actions.rb#L216) +##### [args_with_ele_ref](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/device/touch_actions.rb#L225) > def args_with_ele_ref(args) -- -##### [initialize](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/wait.rb#L4) +##### [initialize](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/wait.rb#L4) > def initialize(opts = {}) @@ -1549,29 +1623,21 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Wait] a new instance of Wait -- -##### [until](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/wait.rb#L23) +##### [until](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/wait.rb#L23) > def until Wait code from the selenium Ruby gem https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb -- -##### [_process_wait_opts](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/wait.rb#L51) +##### [wait_true](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/wait.rb#L73) -> def _process_wait_opts(opts) - -process opts before calling _generic_wait - --- - -##### [wait_true](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/wait.rb#L72) - > def wait_true(opts = {}) Check every interval seconds to see if yield returns a truthy value. Note this isn't a strict boolean true, any truthy value is accepted. false and nil are considered failures. @@ -1586,11 +1652,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - Options -- -##### [wait](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/wait.rb#L95) +##### [wait](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/wait.rb#L96) > def wait(opts = {}) Check every interval seconds to see if yield doesn't raise an exception. Give up after timeout seconds. @@ -1604,19 +1670,19 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - Options -- -##### [ignore](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L24) +##### [ignore](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L24) > def ignore Return yield and ignore any exceptions. -- -##### [back](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L31) +##### [back](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L31) > def back Navigate back. @@ -1624,19 +1690,19 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [session_id](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L36) +##### [session_id](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L36) > def session_id For Sauce Labs reporting. Returns the current session id. -- -##### [xpath](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L44) +##### [xpath](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L44) > def xpath(xpath_str) Returns the first element that matches the provided xpath. @@ -1648,11 +1714,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [xpaths](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L52) +##### [xpaths](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L52) > def xpaths(xpath_str) Returns all elements that match the provided xpath. @@ -1664,27 +1730,27 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [_print_source](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L56) +##### [_print_source](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L56) > def _print_source(source) -- -##### [result](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L69) +##### [result](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L69) > def result Returns the value of attribute result -- -##### [initialize](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L71) +##### [initialize](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L71) > def initialize @@ -1692,64 +1758,64 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[CountElements] a new instance of CountElements -- -##### [reset](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L75) +##### [reset](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L75) > def reset -- -##### [start_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L80) +##### [start_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L80) -> def start_element(name, attrs = []) +> def start_element(name, attrs = [], driver = $driver) http://nokogiri.org/Nokogiri/XML/SAX/Document.html -- -##### [formatted_result](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L86) +##### [formatted_result](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L86) > def formatted_result -- -##### [get_page_class](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L97) +##### [get_page_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L97) > def get_page_class Returns a string of class counts of visible elements. -- -##### [page_class](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L108) +##### [page_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L108) > def page_class Count all classes on screen and print to stdout. Useful for appium_console. -- -##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L118) +##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L118) -> def px_to_window_rel(opts = {}) +> def px_to_window_rel(opts = {}, driver = $driver) Converts pixel values to window relative values ```ruby px_to_window_rel x: 50, y: 150 ``` -- -##### [xml_keys](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L137) +##### [xml_keys](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L137) > def xml_keys(target) Search strings.xml's values for target. @@ -1761,11 +1827,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array] -- -##### [xml_values](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L145) +##### [xml_values](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L145) > def xml_values(target) Search strings.xml's keys for target. @@ -1777,11 +1843,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array] -- -##### [resolve_id](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L153) +##### [resolve_id](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L153) > def resolve_id(id) Resolve id in strings.xml and return the value. @@ -1793,27 +1859,27 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] -- -##### [filter](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L159) +##### [filter](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L159) > def filter Returns the value of attribute filter -- -##### [filter=](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L162) +##### [filter=](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L162) > def filter=(value) convert to string to support symbols -- -##### [initialize](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L168) +##### [initialize](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L168) > def initialize @@ -1821,99 +1887,107 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[HTMLElements] a new instance of HTMLElements -- -##### [reset](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L173) +##### [reset](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L173) > def reset -- -##### [result](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L179) +##### [result](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L179) > def result -- -##### [start_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L195) +##### [start_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L195) > def start_element(name, attrs = []) -- -##### [end_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L204) +##### [end_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L204) > def end_element(name) -- -##### [characters](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L210) +##### [characters](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/helper.rb#L210) > def characters(chars) -- -##### [_no_such_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/helper.rb#L217) +##### [COMMAND_NO_ARG](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/command.rb#L4) -> def _no_such_element +> COMMAND_NO_ARG = { -- -##### [COMMAND_NO_ARG](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/command.rb#L4) +##### [COMMAND](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/command.rb#L28) -> COMMAND_NO_ARG = { +> COMMAND = { -- -##### [COMMAND](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/command.rb#L28) +##### [COMMANDS_EXTEND_OSS](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/command.rb#L66) -> COMMAND = { +> COMMANDS_EXTEND_OSS = COMMAND.merge(::Selenium::WebDriver::Remote::OSS::Bridge::COMMANDS).freeze -- -##### [window_size](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/element/window.rb#L5) +##### [COMMANDS_EXTEND_W3C](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/command.rb#L67) +> COMMANDS_EXTEND_W3C = COMMAND.merge(::Selenium::WebDriver::Remote::W3C::Bridge::COMMANDS).freeze + + + +-- + +##### [window_size](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/element/window.rb#L5) + > def window_size Get the window's size -- -##### [FINDERS](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/search_context.rb#L5) +##### [FINDERS](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/search_context.rb#L5) > FINDERS = { rubocop:disable Style/MutableConstant -- -##### [filter](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L4) ios +##### [filter](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L4) ios > def filter Returns the value of attribute filter -- -##### [filter=](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L4) ios +##### [filter=](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L4) ios > def filter=(value) Sets the attribute filter @@ -1921,27 +1995,27 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value - the value to set the attribute filter to. -- -##### [start_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L6) ios +##### [start_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L6) ios > def start_element(type, attrs = []) -- -##### [_print_attr](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L15) ios +##### [_print_attr](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L15) ios > def _print_attr(type, name, label, value, hint, visible) # rubocop:disable Metrics/ParameterLists rubocop:disable Metrics/ParameterLists -- -##### [ios_password](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L42) ios +##### [ios_password](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L42) ios > def ios_password(length = 1) iOS only. On Android uiautomator always returns an empty string for EditText password. @@ -1955,11 +2029,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] the returned string is of size length -- -##### [get_page](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L55) ios +##### [get_page](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L55) ios > def get_page(element = source_window(0), class_name = nil) Returns a string of interesting elements. iOS only. @@ -1976,11 +2050,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] -- -##### [page](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L142) ios +##### [page](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L142) ios > def page(opts = {}) Prints a string of interesting elements to the console. @@ -2001,11 +2075,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [source_window](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L166) ios +##### [source_window](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L166) ios > def source_window(window_number = nil) Gets the JSON source of window number @@ -2013,11 +2087,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[JSON] -- -##### [page_window](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L177) ios +##### [page_window](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L177) ios > def page_window(window_number = 0) Prints parsed page source to console. @@ -2031,11 +2105,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [id](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L185) ios +##### [id](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L185) ios > def id(id) Find by id @@ -2047,11 +2121,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [ios_version](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L191) ios +##### [ios_version](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L191) ios > def ios_version Return the iOS version as an array of integers @@ -2059,11 +2133,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Integer>] -- -##### [ele_index](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L204) ios +##### [ele_index](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L200) ios > def ele_index(class_name, index) Get the element of type class_name at matching index. @@ -2077,11 +2151,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [find_ele_by_attr](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L240) ios +##### [find_ele_by_attr](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L228) ios > def find_ele_by_attr(class_name, attr, value) Find the first element exactly matching class and attribute value. Note: Uses XPath @@ -2099,11 +2173,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [find_eles_by_attr](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L251) ios +##### [find_eles_by_attr](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L239) ios > def find_eles_by_attr(class_name, attr, value) Find all elements exactly matching class and attribute value. Note: Uses XPath @@ -2121,11 +2195,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [find_ele_by_predicate](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L272) ios +##### [find_ele_by_predicate](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L252) ios > def find_ele_by_predicate(class_name: '*', value:) Find the first element exactly matching attribute case insensitive value. Note: Uses Predicate @@ -2138,11 +2212,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [find_eles_by_predicate](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L283) ios +##### [find_eles_by_predicate](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L263) ios > def find_eles_by_predicate(class_name: '*', value:) Find all elements exactly matching attribute case insensitive value. Note: Uses Predicate @@ -2157,11 +2231,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [find_ele_by_attr_include](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L299) ios +##### [find_ele_by_attr_include](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L279) ios > def find_ele_by_attr_include(class_name, attr, value) Get the first tag by attribute that exactly matches value. Note: Uses XPath @@ -2178,11 +2252,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element of type tag who's attribute includes value -- -##### [find_eles_by_attr_include](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L309) ios +##### [find_eles_by_attr_include](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L289) ios > def find_eles_by_attr_include(class_name, attr, value) Get tags by attribute that include value. Note: Uses XPath @@ -2199,11 +2273,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] the elements of type tag who's attribute includes value -- -##### [find_ele_by_predicate_include](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L317) ios +##### [find_ele_by_predicate_include](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L297) ios > def find_ele_by_predicate_include(class_name: '*', value:) Get the first elements that include insensitive value. Note: Uses Predicate @@ -2216,11 +2290,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element of type tag who's attribute includes value -- -##### [find_eles_by_predicate_include](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L328) ios +##### [find_eles_by_predicate_include](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L308) ios > def find_eles_by_predicate_include(class_name: '*', value:) Get elements that include case insensitive value. Note: Uses Predicate @@ -2235,11 +2309,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] the elements of type tag who's attribute includes value -- -##### [first_ele](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L341) ios +##### [first_ele](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L321) ios > def first_ele(class_name) Get the first tag that matches class_name @@ -2251,11 +2325,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [last_ele](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L348) ios +##### [last_ele](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L328) ios > def last_ele(class_name) Get the last tag that matches class_name @@ -2267,11 +2341,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [tag](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L362) ios +##### [tag](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L336) ios > def tag(class_name) Returns the first **visible** element matching class_name @@ -2283,11 +2357,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [tags](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L374) ios +##### [tags](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L344) ios > def tags(class_name) Returns all visible elements matching class_name @@ -2299,11 +2373,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [tags_include](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L390) ios +##### [tags_include](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L355) ios > def tags_include(class_names:, value: nil) Returns all visible elements matching class_names and value This method calls find_element/s and element.value/text many times. @@ -2319,11 +2393,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]] -- -##### [tags_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L419) ios +##### [tags_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L370) ios > def tags_exact(class_names:, value: nil) Returns all visible elements matching class_names and value. This method calls find_element/s and element.value/text many times. @@ -2339,11 +2413,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]] -- -##### [ele_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L470) ios +##### [ele_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L407) ios > def ele_by_json_visible_contains(element, value) Find the first element that contains value. For Appium(automation name), not XCUITest @@ -2358,11 +2432,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [eles_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L479) ios +##### [eles_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L416) ios > def eles_by_json_visible_contains(element, value) Find all elements containing value For Appium(automation name), not XCUITest @@ -2377,11 +2451,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [ele_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L509) ios +##### [ele_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L446) ios > def ele_by_json_visible_exact(element, value) Find the first element exactly matching value For Appium(automation name), not XCUITest @@ -2396,11 +2470,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [eles_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L518) ios +##### [eles_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L455) ios > def eles_by_json_visible_exact(element, value) Find all elements exactly matching value For Appium(automation name), not XCUITest @@ -2415,21 +2489,21 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [_all_pred](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L527) ios +##### [_all_pred](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L464) ios > def _all_pred(opts) predicate - the predicate to evaluate on the main app visible - if true, only visible elements are returned. default true -- -##### [ele_with_pred](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L540) ios +##### [ele_with_pred](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L477) ios > def ele_with_pred(opts) returns element matching predicate contained in the main app @@ -2441,11 +2515,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [eles_with_pred](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L551) ios +##### [eles_with_pred](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L488) ios > def eles_with_pred(opts) returns elements matching predicate contained in the main app @@ -2457,11 +2531,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [source](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L557) ios +##### [source](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L494) ios > def source Prints xml of the current page @@ -2469,19 +2543,19 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [_validate_object](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L561) ios +##### [_validate_object](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L498) ios > def _validate_object(*objects) -- -##### [_by_json](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L610) ios +##### [_by_json](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L547) ios > def _by_json(opts) For Appium(automation name), not XCUITest typeArray - array of string types to search for. Example: ["UIAStaticText"] @@ -2512,11 +2586,11 @@ } } -- -##### [eles_by_json](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L660) ios +##### [eles_by_json](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L597) ios > def eles_by_json(opts) For Appium(automation name), not XCUITest example usage: @@ -2531,19 +2605,19 @@ }, }) -- -##### [ele_by_json](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L666) ios +##### [ele_by_json](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L603) ios > def ele_by_json(opts) see eles_by_json -- -##### [get_source](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/helper.rb#L676) ios +##### [get_source](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/helper.rb#L613) ios > def get_source Returns XML string for the current page Same as driver.page_source @@ -2552,27 +2626,27 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] -- -##### [UIAStaticText](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L4) ios +##### [UIAStaticText](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L4) ios > UIAStaticText = 'UIAStaticText'.freeze -- -##### [XCUIElementTypeStaticText](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L5) ios +##### [XCUIElementTypeStaticText](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L5) ios > XCUIElementTypeStaticText = 'XCUIElementTypeStaticText'.freeze -- -##### [static_text_class](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L8) ios +##### [static_text_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L8) ios > def static_text_class @@ -2580,11 +2654,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text -- -##### [text](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L16) ios +##### [text](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L16) ios > def text(value) Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index. If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned. @@ -2597,11 +2671,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] -- -##### [texts](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L30) ios +##### [texts](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L25) ios > def texts(value = false) Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value. If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned @@ -2614,11 +2688,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAStaticText|XCUIElementTypeStaticText>] -- -##### [first_text](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L43) ios +##### [first_text](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L32) ios > def first_text Find the first UIAStaticText|XCUIElementTypeStaticText. @@ -2626,11 +2700,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] -- -##### [last_text](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L49) ios +##### [last_text](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L38) ios > def last_text Find the last UIAStaticText|XCUIElementTypeStaticText. @@ -2638,11 +2712,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] -- -##### [text_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L56) ios +##### [text_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L45) ios > def text_exact(value) Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value. @@ -2654,11 +2728,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] -- -##### [texts_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/text.rb#L67) ios +##### [texts_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/text.rb#L52) ios > def texts_exact(value) Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value. @@ -2670,11 +2744,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAStaticText|XCUIElementTypeStaticText>] -- -##### [alert_accept](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/alert.rb#L5) ios +##### [alert_accept](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/alert.rb#L5) ios > def alert_accept Accept the alert. @@ -2682,11 +2756,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/alert.rb#L13) ios +##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/alert.rb#L13) ios > def alert_dismiss Dismiss the alert. @@ -2694,27 +2768,27 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void] -- -##### [UIAButton](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L4) ios +##### [UIAButton](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L4) ios > UIAButton = 'UIAButton'.freeze -- -##### [XCUIElementTypeButton](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L5) ios +##### [XCUIElementTypeButton](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L5) ios > XCUIElementTypeButton = 'XCUIElementTypeButton'.freeze -- -##### [button_class](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L8) ios +##### [button_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L8) ios > def button_class @@ -2722,11 +2796,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for button -- -##### [button](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L16) ios +##### [button](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L16) ios > def button(value) Find the first UIAButton|XCUIElementTypeButton that contains value or by index. If int then the UIAButton|XCUIElementTypeButton at that index is returned. @@ -2739,11 +2813,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] -- -##### [buttons](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L31) ios +##### [buttons](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L26) ios > def buttons(value = false) Find all UIAButtons|XCUIElementTypeButtons containing value. If value is omitted, all UIAButtons|XCUIElementTypeButtons are returned. @@ -2756,11 +2830,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAButton|XCUIElementTypeButton>] -- -##### [first_button](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L44) ios +##### [first_button](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L33) ios > def first_button Find the first UIAButton|XCUIElementTypeButton. @@ -2768,11 +2842,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] -- -##### [last_button](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L52) ios +##### [last_button](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L41) ios > def last_button TODO: add documentation regarding previous element. Previous UIAElement is differ from UIAButton|XCUIElementTypeButton. So, the results are different. @@ -2782,11 +2856,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] -- -##### [button_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L59) ios +##### [button_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L48) ios > def button_exact(value) Find the first UIAButton|XCUIElementTypeButton that exactly matches value. @@ -2798,11 +2872,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] -- -##### [buttons_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/button.rb#L70) ios +##### [buttons_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/button.rb#L55) ios > def buttons_exact(value) Find all UIAButtons|XCUIElementTypeButtons that exactly match value. @@ -2814,11 +2888,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAButton|XCUIElementTypeButton>] -- -##### [uiautomation_find](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/mobile_methods.rb#L19) ios +##### [uiautomation_find](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/mobile_methods.rb#L19) ios > def uiautomation_find find_element/s can be used with a [UIAutomation command](https://developer.apple.com/library/ios/documentation/ToolsLanguages/Reference/UIAWindowClassReference/UIAWindow/UIAWindow.html#//apple_ref/doc/uid/TP40009930). @@ -2826,11 +2900,11 @@ find_elements :uiautomation, 'elements() ``` -- -##### [ios_predicate_string_find](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/mobile_methods.rb#L19) ios +##### [ios_predicate_string_find](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/mobile_methods.rb#L19) ios > def ios_predicate_string_find find_element/s can be used with a [Predicates](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html) @@ -2840,30 +2914,12 @@ find_elements :predicate, 'wdValue == "SearchBar" AND isWDDivisible == 1' ``` -- -##### [ios_class_chain_find](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/mobile_methods.rb#L39) ios +##### [find](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/generic.rb#L6) ios -> def ios_class_chain_find - -Only for XCUITest(WebDriverAgent) -find_element/s can be used with a [class chain]( https://github.com/facebook/WebDriverAgent/wiki/Queries) - -```ruby - # select the third child button of the first child window element - find_elements :class_chain, 'XCUIElementTypeWindow/XCUIElementTypeButton[3]' - # select all the children windows - find_elements :class_chain, 'XCUIElementTypeWindow' - # select the second last child of the second child window - find_elements :class_chain, 'XCUIElementTypeWindow[2]/XCUIElementTypeAny[-2]' -``` - --- - -##### [find](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/generic.rb#L6) ios - > def find(value) Find the first element containing value __Parameters:__ @@ -2874,11 +2930,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [finds](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/generic.rb#L17) ios +##### [finds](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/generic.rb#L13) ios > def finds(value) Find all elements containing value @@ -2890,11 +2946,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [find_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/generic.rb#L29) ios +##### [find_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/generic.rb#L20) ios > def find_exact(value) Find the first element exactly matching value @@ -2906,11 +2962,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [finds_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/generic.rb#L40) ios +##### [finds_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/generic.rb#L27) ios > def finds_exact(value) Find all elements exactly matching value @@ -2922,108 +2978,200 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] -- -##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/generic.rb#L51) ios +##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/generic.rb#L33) ios > def raise_error_if_no_element(element) -- -##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/generic.rb#L58) ios +##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/generic.rb#L40) ios > def select_visible_elements(elements) Return visible elements. -- -##### [UIATextField](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L3) ios +##### [hide_keyboard](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/device.rb#L9) ios -> UIATextField = 'UIATextField'.freeze +> def hide_keyboard +Hide the onscreen keyboard +__Parameters:__ +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] close_key - The name of the key which closes the keyboard. + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Symbol] strategy - The symbol of the strategy which closes the keyboard. +XCUITest ignore this argument. +Default for iOS is `:pressKey`. Default for Android is `:tapOutside`. + -- -##### [UIASecureTextField](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L4) ios +##### [ios_version](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/helper.rb#L7) ios -> UIASecureTextField = 'UIASecureTextField'.freeze +> def ios_version +Return the iOS version as an array of integers +__Returns:__ +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Integer>] + -- -##### [XCUIElementTypeTextField](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L6) ios +##### [last_ele](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/helper.rb#L32) ios -> XCUIElementTypeTextField = 'XCUIElementTypeTextField'.freeze +> def last_ele(class_name) +Get the last tag that matches class_name +__Parameters:__ +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag to match + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] + -- -##### [XCUIElementTypeSecureTextField](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L7) ios +##### [tag](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/helper.rb#L42) ios -> XCUIElementTypeSecureTextField = 'XCUIElementTypeSecureTextField'.freeze +> def tag(class_name) +Returns the first **visible** element matching class_name +__Parameters:__ +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] + -- -##### [text_field_class](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L10) ios +##### [tags](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/helper.rb#L50) ios -> def text_field_class +> def tags(class_name) +Returns all visible elements matching class_name +__Parameters:__ +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for + __Returns:__ -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text field +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] -- -##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L15) ios +##### [tags_include](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/helper.rb#L62) ios -> def secure_text_field_class +> def tags_include(class_names:, value: nil) +Returns all visible elements matching class_names and value +This method calls find_element/s and element.value/text many times. +So, if you set many class_names, this method's performance become worse. +__Parameters:__ +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[String]] class_names - the class_names to search for + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + __Returns:__ -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for secure text field +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]] -- -##### [_textfield_visible](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L35) ios +##### [tags_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/helper.rb#L85) ios -> def _textfield_visible +> def tags_exact(class_names:, value: nil) -Appium +Returns all visible elements matching class_names and value. +This method calls find_element/s and element.value/text many times. +So, if you set many class_names, this method's performance become worse. +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[String]] class_names - the class_names to search for + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]] + -- -##### [_textfield_exact_string](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L40) ios +##### [UIATextField](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L3) ios -> def _textfield_exact_string(value) +> UIATextField = 'UIATextField'.freeze -Appium + -- -##### [_textfield_contains_string](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L47) ios +##### [UIASecureTextField](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L4) ios -> def _textfield_contains_string(value) +> UIASecureTextField = 'UIASecureTextField'.freeze -Appium + -- -##### [textfield](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L60) ios +##### [XCUIElementTypeTextField](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L6) ios +> XCUIElementTypeTextField = 'XCUIElementTypeTextField'.freeze + + + +-- + +##### [XCUIElementTypeSecureTextField](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L7) ios + +> XCUIElementTypeSecureTextField = 'XCUIElementTypeSecureTextField'.freeze + + + +-- + +##### [text_field_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L10) ios + +> def text_field_class + + + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text field + +-- + +##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L15) ios + +> def secure_text_field_class + + + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for secure text field + +-- + +##### [textfield](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L24) ios + > def textfield(value) Find the first TextField that contains value or by index. Note: Uses XPath If int then the TextField at that index is returned. @@ -3036,11 +3184,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] -- -##### [textfields](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L86) ios +##### [textfields](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L42) ios > def textfields(value = false) Find all TextFields containing value. If value is omitted, all TextFields are returned. @@ -3053,11 +3201,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>] -- -##### [first_textfield](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L100) ios +##### [first_textfield](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L49) ios > def first_textfield Find the first TextField. @@ -3065,11 +3213,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] -- -##### [last_textfield](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L110) ios +##### [last_textfield](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L55) ios > def last_textfield Find the last TextField. @@ -3077,11 +3225,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] -- -##### [textfield_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L123) ios +##### [textfield_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L64) ios > def textfield_exact(value) Find the first TextField that exactly matches value. @@ -3093,11 +3241,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] -- -##### [textfields_exact](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/element/textfield.rb#L134) ios +##### [textfields_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L71) ios > def textfields_exact(value) Find all TextFields that exactly match value. @@ -3109,12 +3257,36 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>] -- -##### [swipe](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L11) ios +##### [_textfield_visible](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L78) ios +> def _textfield_visible + +Appium + +-- + +##### [_textfield_exact_string](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L83) ios + +> def _textfield_exact_string(value) + +Appium + +-- + +##### [_textfield_contains_string](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/element/textfield.rb#L90) ios + +> def _textfield_contains_string(value) + +Appium + +-- + +##### [swipe](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L11) ios + > def swipe(direction:, element: nil) __Parameters:__ @@ -3123,11 +3295,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [scroll](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L31) ios +##### [scroll](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L29) ios > def scroll(direction:, name: nil, element: nil, to_visible: nil, predicate_string: nil) @@ -3137,11 +3309,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [pinch](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L50) ios +##### [pinch](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L48) ios > def pinch(scale:, velocity: 1.0, element: nil) @@ -3153,11 +3325,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [double_tap](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L67) ios +##### [double_tap](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L63) ios > def double_tap(x: nil, y: nil, element: nil) @@ -3169,11 +3341,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [touch_and_hold](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L85) ios +##### [touch_and_hold](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L80) ios > def touch_and_hold(x: nil, y: nil, element: nil, duration: 1.0) @@ -3187,11 +3359,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L99) ios +##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L93) ios > def two_finger_tap(element:) @@ -3203,11 +3375,11 @@ two_finger_tap element: find_element(:accessibility_id, "some item") ``` -- -##### [tap](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L116) ios +##### [tap](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L108) ios > def tap(x:, y:, element: nil) @@ -3219,11 +3391,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [drag_from_to_for_duration](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L138) ios +##### [drag_from_to_for_duration](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L128) ios > def drag_from_to_for_duration(from_x:, from_y:, to_x:, to_y:, duration: 1.0, element: nil) rubocop:disable Metrics/ParameterLists @@ -3242,11 +3414,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [select_picker_wheel](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L157) ios +##### [select_picker_wheel](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L145) ios > def select_picker_wheel(element:, order:, offset: nil) https://github.com/facebook/WebDriverAgent/pull/523 https://github.com/appium/appium-xcuitest-driver/pull/420 @@ -3259,11 +3431,11 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options -- -##### [alert](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/ios/xcuitest_gestures.rb#L176) ios +##### [alert](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/gestures.rb#L163) ios > def alert(action:, button_label: nil) @@ -3274,33 +3446,452 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] button_label - The label text of an existing alert button to click on. This is an optional parameter and is only valid in combination with accept and dismiss actions. -- -##### [value](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/patch.rb#L12) +##### [static_text_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L9) ios +> def static_text_class + + + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text + +-- + +##### [text](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L17) ios + +> def text(value) + +Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index. +If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to find. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] + +-- + +##### [texts](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L26) ios + +> def texts(value = false) + +Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value. +If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAStaticText|XCUIElementTypeStaticText>] + +-- + +##### [first_text](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L34) ios + +> def first_text + +Find the first UIAStaticText|XCUIElementTypeStaticText. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] + +-- + +##### [last_text](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L40) ios + +> def last_text + +Find the last UIAStaticText|XCUIElementTypeStaticText. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] + +-- + +##### [text_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L47) ios + +> def text_exact(value) + +Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAStaticText|XCUIElementTypeStaticText] + +-- + +##### [texts_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/text.rb#L54) ios + +> def texts_exact(value) + +Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAStaticText|XCUIElementTypeStaticText>] + +-- + +##### [button_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L9) ios + +> def button_class + + + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for button + +-- + +##### [button](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L17) ios + +> def button(value) + +Find the first UIAButton|XCUIElementTypeButton that contains value or by index. +If int then the UIAButton|XCUIElementTypeButton at that index is returned. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to exactly match. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] + +-- + +##### [buttons](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L27) ios + +> def buttons(value = false) + +Find all UIAButtons|XCUIElementTypeButtons containing value. +If value is omitted, all UIAButtons|XCUIElementTypeButtons are returned. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAButton|XCUIElementTypeButton>] + +-- + +##### [first_button](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L35) ios + +> def first_button + +Find the first UIAButton|XCUIElementTypeButton. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] + +-- + +##### [last_button](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L43) ios + +> def last_button + +TODO: add documentation regarding previous element. + Previous UIAElement is differ from UIAButton|XCUIElementTypeButton. So, the results are different. +Find the last UIAButton|XCUIElementTypeButton. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] + +-- + +##### [button_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L50) ios + +> def button_exact(value) + +Find the first UIAButton|XCUIElementTypeButton that exactly matches value. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIAButton|XCUIElementTypeButton] + +-- + +##### [buttons_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/button.rb#L57) ios + +> def buttons_exact(value) + +Find all UIAButtons|XCUIElementTypeButtons that exactly match value. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIAButton|XCUIElementTypeButton>] + +-- + +##### [ios_class_chain_find](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/mobile_methods.rb#L17) ios + +> def ios_class_chain_find + +Only for XCUITest(WebDriverAgent) +find_element/s can be used with a [class chain]( https://github.com/facebook/WebDriverAgent/wiki/Queries) + +```ruby + # select the third child button of the first child window element + find_elements :class_chain, 'XCUIElementTypeWindow/XCUIElementTypeButton[3]' + # select all the children windows + find_elements :class_chain, 'XCUIElementTypeWindow' + # select the second last child of the second child window + find_elements :class_chain, 'XCUIElementTypeWindow[2]/XCUIElementTypeAny[-2]' +``` + +-- + +##### [find](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/generic.rb#L8) ios + +> def find(value) + +Find the first element containing value + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] + +-- + +##### [finds](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/generic.rb#L15) ios + +> def finds(value) + +Find all elements containing value + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] + +-- + +##### [find_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/generic.rb#L23) ios + +> def find_exact(value) + +Find the first element exactly matching value + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] + +-- + +##### [finds_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/generic.rb#L30) ios + +> def finds_exact(value) + +Find all elements exactly matching value + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] + +-- + +##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/generic.rb#L37) ios + +> def raise_error_if_no_element(element) + + + +-- + +##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/generic.rb#L44) ios + +> def select_visible_elements(elements) + +Return visible elements. + +-- + +##### [text_field_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L9) ios + +> def text_field_class + + + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text field + +-- + +##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L14) ios + +> def secure_text_field_class + + + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for secure text field + +-- + +##### [textfield](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L23) ios + +> def textfield(value) + +Find the first TextField that contains value or by index. +Note: Uses XPath +If int then the TextField at that index is returned. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the text to match exactly. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] + +-- + +##### [textfields](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L41) ios + +> def textfields(value = false) + +Find all TextFields containing value. +If value is omitted, all TextFields are returned. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>] + +-- + +##### [first_textfield](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L50) ios + +> def first_textfield + +Find the first TextField. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] + +-- + +##### [last_textfield](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L56) ios + +> def last_textfield + +Find the last TextField. + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] + +-- + +##### [textfield_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L65) ios + +> def textfield_exact(value) + +Find the first TextField that exactly matches value. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField] + +-- + +##### [textfields_exact](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/ios/xcuitest/element/textfield.rb#L72) ios + +> def textfields_exact(value) + +Find all TextFields that exactly match value. + +__Parameters:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly + +__Returns:__ + +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>] + +-- + +##### [value](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/patch.rb#L12) + > def value Returns the value attribute Fixes NoMethodError: undefined method `value' for Selenium::WebDriver::Element -- -##### [name](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/patch.rb#L19) +##### [name](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/patch.rb#L19) > def name Returns the name attribute Fixes NoMethodError: undefined method `name' for Selenium::WebDriver::Element -- -##### [location_rel](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/patch.rb#L30) +##### [location_rel](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/patch.rb#L30) -> def location_rel +> def location_rel(driver = $driver) For use with mobile tap. ```ruby execute_script 'mobile: tap', :x => 0.0, :y => 0.98 @@ -3310,18 +3901,18 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[OpenStruct] the relative x, y in a struct. ex: { x: 0.50, y: 0.20 } -- -##### [DEFAULT_HEADERS](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/patch.rb#L165) +##### [DEFAULT_HEADERS](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/patch.rb#L170) > DEFAULT_HEADERS = { 'Accept' => CONTENT_TYPE, 'User-Agent' => "appium/ruby_lib/#{::Appium::VERSION}" }.freeze -- -##### [patch_remote_driver_commands](https://github.com/appium/ruby_lib/blob/0ae697630a959ab8178b3c4b22911460f98157d2/lib/appium_lib/common/patch.rb#L168) +##### [patch_remote_driver_commands](https://github.com/appium/ruby_lib/blob/a4c238552724878c31d8ff0179ef00d8258c76a4/lib/appium_lib/common/patch.rb#L173) > def patch_remote_driver_commands