diff --git a/README.md b/README.md index 26643878..1ba2512a 100644 --- a/README.md +++ b/README.md @@ -340,6 +340,7 @@ Roles are ALWAYS defined at the begining of the cases. You have to write always 14. [handle_ios_alert](#handle_ios_alert) 15. [notifications](#notifications) 16. [back](#back) +17. [update_settings](#update_settings) ## API @@ -836,6 +837,14 @@ Works as pressing the button `back` on the phone to go to the previous screen. - Type: back Role: role1 (Optional. if not specified will use the first one defined in the case Roles) +### update_settings + +Updates Appium driver settings. The value must be provided as a JSON object. JSON keys can be optionally placed in quotes. + + - Type: update_settings + Role: role1 (Optional. if not specified will use the first one defined in the case Roles) + Value: { waitForIdleTimeout: 10, 'allowInvisibleElements': true, "elementResponseAttributes": "name" } + ## API ### get_call diff --git a/lib/core/device.rb b/lib/core/device.rb index bcdc9782..0c8e69d8 100644 --- a/lib/core/device.rb +++ b/lib/core/device.rb @@ -275,6 +275,13 @@ def terminate_app(action) end end + # updates Appium driver settings + # Accepts: + # Value + def update_settings(action) + @driver.update_settings(convert_yaml(action["Value"])) + end + # starts recording test execution. Whole desktop is recorded if 'udid' is not # set. # Accepts: