From ceb8acd4df2c8e5f1272331a21e1a9398d760e74 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 21 Nov 2017 10:46:00 +0000 Subject: [PATCH] Update commands for the Ruby client (#9662) * context, activity. app, files, interactions * update commands --- commands-yml/commands/context/get-context.yml | 2 +- .../commands/context/get-contexts.yml | 2 +- commands-yml/commands/context/set-context.yml | 6 +-- .../device/activity/current-activity.yml | 4 +- .../device/activity/current-package.yml | 4 +- .../device/activity/start-activity.yml | 4 +- .../commands/device/app/background-app.yml | 2 +- .../commands/device/app/close-app.yml | 4 +- .../commands/device/app/end-test-coverage.yml | 2 +- .../commands/device/app/get-app-strings.yml | 2 +- .../commands/device/app/install-app.yml | 4 +- .../commands/device/app/is-app-installed.yml | 2 +- .../commands/device/app/launch-app.yml | 4 +- .../commands/device/app/remove-app.yml | 4 +- .../commands/device/app/reset-app.yml | 4 +- .../commands/device/files/pull-file.yml | 4 +- .../commands/device/files/pull-folder.yml | 4 +- .../commands/device/files/push-file.yml | 4 +- .../device/interactions/is-locked.yml | 4 +- .../commands/device/interactions/lock.yml | 5 ++- .../commands/device/interactions/shake.yml | 4 +- .../commands/device/interactions/unlock.yml | 5 ++- .../commands/device/keys/hide-keyboard.yml | 4 +- .../device/keys/is-keyboard-shown.yml | 4 +- .../device/keys/long-press-keycode.yml | 2 +- .../commands/device/keys/press-keycode.yml | 2 +- .../device/network/toggle-airplane-mode.yml | 4 +- .../performance-data/get-performance-data.yml | 4 +- .../performance-data-types.yml | 4 +- .../simulator/toggle-touch-id-enrollment.yml | 4 +- .../commands/device/simulator/touch-id.yml | 2 +- .../device/system/open-notifications.yml | 2 +- .../commands/device/system/system-bars.yml | 4 +- .../commands/device/system/system-time.yml | 2 +- .../commands/element/actions/clear.yml | 2 +- .../commands/element/attributes/displayed.yml | 2 +- .../commands/element/attributes/enabled.yml | 2 +- .../element/attributes/page-index.yml | 17 ++++----- .../commands/element/attributes/rect.yml | 5 +++ .../element/attributes/replace-value.yml | 37 ++++++++++--------- .../commands/element/attributes/selected.yml | 2 +- .../commands/element/attributes/text.yml | 5 ++- .../commands/element/find-elements.yml | 2 +- .../commands/element/other/active.yml | 4 +- .../commands/element/other/equals-element.yml | 6 ++- .../commands/element/other/submit.yml | 5 ++- commands-yml/commands/session/back.yml | 2 +- commands-yml/commands/session/delete.yml | 2 +- .../session/geolocation/get-geolocation.yml | 2 +- commands-yml/commands/session/get.yml | 2 +- .../commands/session/logs/get-log-types.yml | 4 +- .../commands/session/logs/get-log.yml | 4 +- .../session/orientation/get-orientation.yml | 2 +- .../session/orientation/set-orientation.yml | 2 +- .../session/settings/get-settings.yml | 4 ++ .../session/settings/update-settings.yml | 4 ++ .../session/timeouts/implicit-wait.yml | 2 +- .../commands/session/timeouts/timeouts.yml | 4 +- commands-yml/commands/status.yml | 3 +- commands-yml/commands/web/frame/parent.yml | 2 +- commands-yml/commands/web/navigation/back.yml | 2 +- .../commands/web/navigation/forward.yml | 2 +- .../commands/web/navigation/refresh.yml | 2 +- .../web/storage/delete-all-cookies.yml | 2 +- 64 files changed, 137 insertions(+), 117 deletions(-) diff --git a/commands-yml/commands/context/get-context.yml b/commands-yml/commands/context/get-context.yml index 16690c1bf..59b9e3feb 100644 --- a/commands-yml/commands/context/get-context.yml +++ b/commands-yml/commands/context/get-context.yml @@ -42,7 +42,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/README.md#switching-between-native-and-webview" javascript_wdio: "http://webdriver.io/api/mobile/context.html" javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md" - ruby: "https://github.com/appium/ruby_lib" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_context-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/context/get-contexts.yml b/commands-yml/commands/context/get-contexts.yml index bce64306d..e456d9641 100644 --- a/commands-yml/commands/context/get-contexts.yml +++ b/commands-yml/commands/context/get-contexts.yml @@ -39,7 +39,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/README.md#switching-between-native-and-webview" javascript_wdio: "http://webdriver.io/api/mobile/contexts.html" javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md" - ruby: "https://github.com/appium/ruby_lib" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#available_contexts-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/context/set-context.yml b/commands-yml/commands/context/set-context.yml index e7bc70ec9..4010781bd 100644 --- a/commands-yml/commands/context/set-context.yml +++ b/commands-yml/commands/context/set-context.yml @@ -41,9 +41,9 @@ example_usage: ruby: | webview = @driver.available_contexts[1] - @driver.switch_to.context(webview) + @driver.set_context(webview) # ... - @driver.switch_to.context('NATIVE_APP') + @driver.set_context('NATIVE_APP') php: | $contexts = $driver->contexts(); @@ -59,7 +59,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/README.md#switching-between-native-and-webview" javascript_wdio: "http://webdriver.io/api/mobile/context.html" javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md" - ruby: "https://github.com/appium/ruby_lib" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#set_context-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/activity/current-activity.yml b/commands-yml/commands/device/activity/current-activity.yml index 38d35d06f..63945b47b 100644 --- a/commands-yml/commands/device/activity/current-activity.yml +++ b/commands-yml/commands/device/activity/current-activity.yml @@ -17,7 +17,7 @@ example_usage: let activity = driver.currentActivity(); ruby: | - @driver.current_activity; + @driver.current_activity php: | // TODO PHP sample @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L447" javascript_wdio: "http://webdriver.io/api/mobile/currentActivity.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2519" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:current_activity" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_activity-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/activity/current-package.yml b/commands-yml/commands/device/activity/current-package.yml index 4abb1577c..d7e469fdd 100644 --- a/commands-yml/commands/device/activity/current-package.yml +++ b/commands-yml/commands/device/activity/current-package.yml @@ -14,7 +14,7 @@ example_usage: let package = await driver.getCurrentPackage(); ruby: | - @driver.current_package; + @driver.current_package php: | // TODO PHP sample @@ -26,7 +26,7 @@ client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/StartsActivity.html#getCurrentPackage--" python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L453" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2526" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:current_package" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_package-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/activity/start-activity.yml b/commands-yml/commands/device/activity/start-activity.yml index 5f2d2cd85..a4746ce8c 100644 --- a/commands-yml/commands/device/activity/start-activity.yml +++ b/commands-yml/commands/device/activity/start-activity.yml @@ -20,7 +20,7 @@ example_usage: driver.startActivity("com.example", "ActivityName"); ruby: | - @driver.start_activity("com.example", "ActivityName"); + @driver.start_activity app_package: "com.example", app_activity: "ActivityName" php: | // TODO PHP sample @@ -33,7 +33,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L591" javascript_wdio: "http://webdriver.io/api/mobile/startActivity.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2948" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:start_activity" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Android/Device#start_activity-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/background-app.yml b/commands-yml/commands/device/app/background-app.yml index 2082e26f5..4c8369eda 100644 --- a/commands-yml/commands/device/app/background-app.yml +++ b/commands-yml/commands/device/app/background-app.yml @@ -29,7 +29,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L529" javascript_wdio: "http://webdriver.io/api/mobile/background.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2841" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:background_app" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#background_app-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/close-app.yml b/commands-yml/commands/device/app/close-app.yml index 6280716a1..b3a4f2c76 100644 --- a/commands-yml/commands/device/app/close-app.yml +++ b/commands-yml/commands/device/app/close-app.yml @@ -16,7 +16,7 @@ example_usage: driver.close_app(); ruby: | - @driver.close_app() + @driver.close_app php: | // TODO PHP sample @@ -29,7 +29,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L584" javascript_wdio: "http://webdriver.io/api/mobile/closeApp.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2798" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L10" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#close_app-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/end-test-coverage.yml b/commands-yml/commands/device/app/end-test-coverage.yml index 9ca0fea04..151af6171 100644 --- a/commands-yml/commands/device/app/end-test-coverage.yml +++ b/commands-yml/commands/device/app/end-test-coverage.yml @@ -25,7 +25,7 @@ client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/AndroidDriver.html#endTestCoverage-java.lang.String-java.lang.String-" python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L627" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2858" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:end_coverage" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Android/Device#end_coverage-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/get-app-strings.yml b/commands-yml/commands/device/app/get-app-strings.yml index 5e00aefb6..0212e07d2 100644 --- a/commands-yml/commands/device/app/get-app-strings.yml +++ b/commands-yml/commands/device/app/get-app-strings.yml @@ -29,7 +29,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L357" javascript_wdio: "http://webdriver.io/api/mobile/getAppStrings.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2916" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:app_strings" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#app_strings-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/install-app.yml b/commands-yml/commands/device/app/install-app.yml index e855a6074..daad2cf2b 100644 --- a/commands-yml/commands/device/app/install-app.yml +++ b/commands-yml/commands/device/app/install-app.yml @@ -17,7 +17,7 @@ example_usage: driver.installApp('/Users/johndoe/path/to/app.apk') ruby: | - @driver.install_app('/Users/johndoe/path/to/app.apk'); + @driver.install_app('/Users/johndoe/path/to/app.apk') php: | // TODO PHP sample @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L554" javascript_wdio: "http://webdriver.io/api/mobile/installApp.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2540" - ruby: "https://github.com/appium/ruby_lib/blob/eb7680f6db1e821901045beacba0a8b80de722fb/lib/appium_lib/core/common/command.rb#L38" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#install_app-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/is-app-installed.yml b/commands-yml/commands/device/app/is-app-installed.yml index 44e44e591..4b03f7760 100644 --- a/commands-yml/commands/device/app/is-app-installed.yml +++ b/commands-yml/commands/device/app/is-app-installed.yml @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L542" javascript_wdio: "http://webdriver.io/api/mobile/isAppInstalled.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2586" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L40" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#app_installed%3F-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/launch-app.yml b/commands-yml/commands/device/app/launch-app.yml index 1c48e1f1e..ab702672e 100644 --- a/commands-yml/commands/device/app/launch-app.yml +++ b/commands-yml/commands/device/app/launch-app.yml @@ -16,7 +16,7 @@ example_usage: driver.launch(); ruby: | - @driver.launch_app() + @driver.launch_app php: | // TODO PHP sample @@ -29,7 +29,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L578" javascript_wdio: "http://webdriver.io/api/mobile/launch.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2798" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:launch_app" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#launch_app-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/remove-app.yml b/commands-yml/commands/device/app/remove-app.yml index b89842997..0ce6f86b0 100644 --- a/commands-yml/commands/device/app/remove-app.yml +++ b/commands-yml/commands/device/app/remove-app.yml @@ -17,7 +17,7 @@ example_usage: driver.removeApp('com.example.AppName') ruby: | - @driver.remove_app('com.example.AppName'); + @driver.remove_app('com.example.AppName') php: | // TODO PHP sample @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L566" javascript_wdio: "http://webdriver.io/api/mobile/removeApp.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2563" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L39" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#remove_app-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/app/reset-app.yml b/commands-yml/commands/device/app/reset-app.yml index ac76790ce..2f8cae0fb 100644 --- a/commands-yml/commands/device/app/reset-app.yml +++ b/commands-yml/commands/device/app/reset-app.yml @@ -16,7 +16,7 @@ example_usage: driver.reset(); ruby: | - @driver.reset() + @driver.reset php: | // TODO PHP sample @@ -29,7 +29,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L372" javascript_wdio: "http://webdriver.io/api/mobile/reset.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2827" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L11" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#reset-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/files/pull-file.yml b/commands-yml/commands/device/files/pull-file.yml index 04cf3abe3..ffb5a586b 100644 --- a/commands-yml/commands/device/files/pull-file.yml +++ b/commands-yml/commands/device/files/pull-file.yml @@ -17,7 +17,7 @@ example_usage: let data = driver.pullFile('/data/local/tmp/file.txt'); ruby: | - @driver.pull_file('/data/local/tmp/file.txt'); + @driver.pull_file('/data/local/tmp/file.txt') php: | // TODO PHP sample @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L491" javascript_wdio: "http://webdriver.io/api/mobile/pullFile.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2665" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:pull_file" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#pull_file-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/files/pull-folder.yml b/commands-yml/commands/device/files/pull-folder.yml index c26338453..49ff5fb12 100644 --- a/commands-yml/commands/device/files/pull-folder.yml +++ b/commands-yml/commands/device/files/pull-folder.yml @@ -17,7 +17,7 @@ example_usage: let data = driver.pullFolder('/data/local/tmp/file.txt'); ruby: | - @driver.pull_folder('/data/local/tmp/file.txt'); + @driver.pull_folder('/data/local/tmp/file.txt') php: | // TODO PHP sample @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L503" javascript_wdio: "http://webdriver.io/api/mobile/pullFolder.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2688" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:pull_folder" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#pull_folder-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/files/push-file.yml b/commands-yml/commands/device/files/push-file.yml index 616d54e07..a3f14b372 100644 --- a/commands-yml/commands/device/files/push-file.yml +++ b/commands-yml/commands/device/files/push-file.yml @@ -18,7 +18,7 @@ example_usage: driver.pushFile('/data/local/tmp/file.txt', data); ruby: | - @driver.push_file('/Users/johndoe/path/to/app.apk'); + @driver.push_file('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8=') php: | // TODO PHP sample @@ -31,7 +31,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L515" javascript_wdio: "http://webdriver.io/api/mobile/pushFile.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2640" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:push_file" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#push_file-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/interactions/is-locked.yml b/commands-yml/commands/device/interactions/is-locked.yml index ea00ce25c..4ed774218 100644 --- a/commands-yml/commands/device/interactions/is-locked.yml +++ b/commands-yml/commands/device/interactions/is-locked.yml @@ -15,7 +15,7 @@ example_usage: driver.isLocked(); ruby: | - @driver.device_locked() + @driver.device_locked? php: | // TODO PHP sample @@ -27,7 +27,7 @@ client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#isLocked--" javascript_wdio: "http://webdriver.io/api/mobile/isLocked.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2407" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:device_locked%3F" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#device_locked%3F-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/interactions/lock.yml b/commands-yml/commands/device/interactions/lock.yml index 62d67d3af..803d88f28 100644 --- a/commands-yml/commands/device/interactions/lock.yml +++ b/commands-yml/commands/device/interactions/lock.yml @@ -19,7 +19,8 @@ example_usage: driver.lock(); ruby: | - @driver.lock() + @driver.lock + @driver.lock(5) # lock 5 seconds php: | // TODO PHP sample @@ -32,7 +33,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L643" javascript_wdio: "http://webdriver.io/api/mobile/lock.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2363" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L37" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#lock-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/interactions/shake.yml b/commands-yml/commands/device/interactions/shake.yml index a1289b4c4..a411c3417 100644 --- a/commands-yml/commands/device/interactions/shake.yml +++ b/commands-yml/commands/device/interactions/shake.yml @@ -18,7 +18,7 @@ example_usage: driver.shake(); ruby: | - @driver.shake() + @driver.shake php: | // TODO PHP sample @@ -31,7 +31,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L655" javascript_wdio: "http://webdriver.io/api/mobile/shake.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2342" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:shake" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#shake-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/interactions/unlock.yml b/commands-yml/commands/device/interactions/unlock.yml index 1df7dcdcc..4a60d71e0 100644 --- a/commands-yml/commands/device/interactions/unlock.yml +++ b/commands-yml/commands/device/interactions/unlock.yml @@ -15,11 +15,13 @@ example_usage: | await driver.lock(); await driver.unlock(); - javascript_wdio: | driver.lock() .unlock(); + ruby: + | + @driver.unlock php: | // TODO PHP sample @@ -31,6 +33,7 @@ client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#unlockDevice---" javascript_wdio: "http://webdriver.io/api/mobile/unlock.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2386" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#unlock-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/keys/hide-keyboard.yml b/commands-yml/commands/device/keys/hide-keyboard.yml index ef6d0fd54..e2a8a75d9 100644 --- a/commands-yml/commands/device/keys/hide-keyboard.yml +++ b/commands-yml/commands/device/keys/hide-keyboard.yml @@ -17,7 +17,7 @@ example_usage: driver.hideDeviceKeyboard(); ruby: | - @driver.hide_keyboard() + @driver.hide_keyboard php: | // TODO PHP sample @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L378" javascript_wdio: "http://webdriver.io/api/mobile/hideDeviceKeyboard.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2609" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L42" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#hide_keyboard-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/keys/is-keyboard-shown.yml b/commands-yml/commands/device/keys/is-keyboard-shown.yml index d14f3b1f4..b84440b55 100644 --- a/commands-yml/commands/device/keys/is-keyboard-shown.yml +++ b/commands-yml/commands/device/keys/is-keyboard-shown.yml @@ -8,11 +8,11 @@ example_usage: boolean isKeyboardShown = driver.isKeyboardShown(); ruby: | - @driver.is_keyboard_shown(); + @driver.is_keyboard_shown client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/HasDeviceDetails.html#isKeyboardShown--" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L24" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#is_keyboard_shown-instance_method" # Driver support by platform driver_support: diff --git a/commands-yml/commands/device/keys/long-press-keycode.yml b/commands-yml/commands/device/keys/long-press-keycode.yml index 346736de6..a59c32f41 100644 --- a/commands-yml/commands/device/keys/long-press-keycode.yml +++ b/commands-yml/commands/device/keys/long-press-keycode.yml @@ -27,7 +27,7 @@ client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/PressesKeyCode.html#longPressKeyCode-int-" python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L431" javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:long_press_keycode" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#long_press_keycode-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/keys/press-keycode.yml b/commands-yml/commands/device/keys/press-keycode.yml index ca4408f26..6b8d5d269 100644 --- a/commands-yml/commands/device/keys/press-keycode.yml +++ b/commands-yml/commands/device/keys/press-keycode.yml @@ -27,7 +27,7 @@ client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/PressesKeyCode.html#pressKeyCode-int-" python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L415" javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:long_press_keycode" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#press_keycode-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/network/toggle-airplane-mode.yml b/commands-yml/commands/device/network/toggle-airplane-mode.yml index 83bbb970e..a9e777332 100644 --- a/commands-yml/commands/device/network/toggle-airplane-mode.yml +++ b/commands-yml/commands/device/network/toggle-airplane-mode.yml @@ -11,7 +11,7 @@ example_usage: driver.toggleAirplaneMode(); ruby: | - @driver.toggle_flight_mode(); + @driver.toggle_flight_mode php: | // TODO @@ -22,7 +22,7 @@ example_usage: client_docs: javascript_wdio: "http://webdriver.io/api/mobile/toggleAirplaneMode.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2712" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:toggle_flight_mode" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#toggle_flight_mode-instance_method" php: "https://github.com/appium/php-client/" # TODO csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO diff --git a/commands-yml/commands/device/performance-data/get-performance-data.yml b/commands-yml/commands/device/performance-data/get-performance-data.yml index 42cb5ad11..5c6fe48cc 100644 --- a/commands-yml/commands/device/performance-data/get-performance-data.yml +++ b/commands-yml/commands/device/performance-data/get-performance-data.yml @@ -8,7 +8,7 @@ example_usage: List> performanceData = driver.getPerformanceData("my.app.package", "cpuinfo", 5); ruby: | - @driver.get_performance_data() + @driver.get_performance_data package_name: 'io.appium.android.apis', data_type: 'cpuinfo', data_read_timeout: 10 php: | // TODO PHP sample @@ -18,7 +18,7 @@ example_usage: client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L59" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Android/Device#get_performance_data-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/performance-data/performance-data-types.yml b/commands-yml/commands/device/performance-data/performance-data-types.yml index bb7206cc6..3569c2a65 100644 --- a/commands-yml/commands/device/performance-data/performance-data-types.yml +++ b/commands-yml/commands/device/performance-data/performance-data-types.yml @@ -8,7 +8,7 @@ example_usage: List performanceTypes = driver.getSupportedPerformanceDataTypes(); ruby: | - @driver.get_performance_data_types() + @driver.get_performance_data_types php: | // TODO PHP sample @@ -18,7 +18,7 @@ example_usage: client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:get_performance_data_types" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Android/Device#get_performance_data_types-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml b/commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml index 23c62c34b..b32d2ea4b 100644 --- a/commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml +++ b/commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml @@ -24,7 +24,7 @@ example_usage: driver.toggleTouchIdEnrollment(true); ruby: | - @driver.toggle_touch_id_enrollment() + @driver.toggle_touch_id_enrollment php: | // TODO PHP sample @@ -37,7 +37,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L670" javascript_wdio: "http://webdriver.io/api/mobile/toggleTouchIdEnrollment.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3150" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L64" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Ios/Device#toggle_touch_id_enrollment-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/simulator/touch-id.yml b/commands-yml/commands/device/simulator/touch-id.yml index 9cea5f0dc..6f227522c 100644 --- a/commands-yml/commands/device/simulator/touch-id.yml +++ b/commands-yml/commands/device/simulator/touch-id.yml @@ -45,7 +45,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L661" javascript_wdio: "http://webdriver.io/api/mobile/touchId.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3133" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Ios/Device:touch_id" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Ios/Device#touch_id-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/device/system/open-notifications.yml b/commands-yml/commands/device/system/open-notifications.yml index 8fd3889f8..899f01314 100644 --- a/commands-yml/commands/device/system/open-notifications.yml +++ b/commands-yml/commands/device/system/open-notifications.yml @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L676" javascript_wdio: "http://webdriver.io/api/mobile/openNotifications.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3004" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L18" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#open_notifications-instance_method" php: "https://github.com/appium/php-client/" # TODO csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO diff --git a/commands-yml/commands/device/system/system-bars.yml b/commands-yml/commands/device/system/system-bars.yml index 2744138f4..fb10dc550 100644 --- a/commands-yml/commands/device/system/system-bars.yml +++ b/commands-yml/commands/device/system/system-bars.yml @@ -8,7 +8,7 @@ example_usage: Map systemBars = driver.getSystemBars(); ruby: | - @driver.get_system_bars(); + @driver.get_system_bars php: | // TODO @@ -18,7 +18,7 @@ example_usage: client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/android/HasDeviceDetails.html#getSystemBars--" - ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:get_system_bars" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#get_system_bars-instance_method" php: "https://github.com/appium/php-client/" # TODO csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO diff --git a/commands-yml/commands/device/system/system-time.yml b/commands-yml/commands/device/system/system-time.yml index beb7dd33a..d4fd5a074 100644 --- a/commands-yml/commands/device/system/system-time.yml +++ b/commands-yml/commands/device/system/system-time.yml @@ -30,7 +30,7 @@ client_docs: python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L798" javascript_wdio: "http://webdriver.io/api/mobile/getDeviceTime.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3119" - ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L13" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#device_time-instance_method" php: "https://github.com/appium/php-client/" # TODO csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO diff --git a/commands-yml/commands/element/actions/clear.yml b/commands-yml/commands/element/actions/clear.yml index 100a77617..8c6e4065f 100644 --- a/commands-yml/commands/element/actions/clear.yml +++ b/commands-yml/commands/element/actions/clear.yml @@ -18,7 +18,7 @@ example_usage: driver.clearElement("~SomeAccessibilityId"); ruby: | - @driver.find_element(:accessibility_id, "SomeAccessibilityID").clear() + @driver.find_element(:accessibility_id, "SomeAccessibilityID").clear php: | // TODO PHP sample diff --git a/commands-yml/commands/element/attributes/displayed.yml b/commands-yml/commands/element/attributes/displayed.yml index 3433e0286..1540d02c1 100644 --- a/commands-yml/commands/element/attributes/displayed.yml +++ b/commands-yml/commands/element/attributes/displayed.yml @@ -20,7 +20,7 @@ example_usage: let isDisplayed = driver.elementIdDisplayed("~SomeAccessibilityId"); ruby: | - @driver.find_element(:accessibility_id, "SomeAccessibilityID").displayed?() + @driver.find_element(:accessibility_id, "SomeAccessibilityID").displayed? php: | // TODO PHP sample diff --git a/commands-yml/commands/element/attributes/enabled.yml b/commands-yml/commands/element/attributes/enabled.yml index ed8208ca3..cef406796 100644 --- a/commands-yml/commands/element/attributes/enabled.yml +++ b/commands-yml/commands/element/attributes/enabled.yml @@ -18,7 +18,7 @@ example_usage: let isEnabled = driver.isEnabled("~SomeAccessibilityId"); ruby: | - @driver.find_element(:accessibility_id, "SomeAccessibilityID").enabled?() + @driver.find_element(:accessibility_id, "SomeAccessibilityID").enabled? php: | // TODO PHP sample diff --git a/commands-yml/commands/element/attributes/page-index.yml b/commands-yml/commands/element/attributes/page-index.yml index ec854219c..40ffb9588 100644 --- a/commands-yml/commands/element/attributes/page-index.yml +++ b/commands-yml/commands/element/attributes/page-index.yml @@ -5,21 +5,19 @@ short_description: Get an element's tag name example_usage: java: | - MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID"); - String tagName = element.getTagName(); + // TODO Java sample python: | - tagName = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').tag_name + // TODO Python sample javascript_wd: | - let element = await driver.elementByAccessibilityId("SomeAccessibilityID"); - let tagName = await element.getTagName(); + // TODO javascript_wd sample javascript_wdio: | - let tagName = driver.getTagName("~SomeAccessibilityId"); + // TODO javascript_wdio sample ruby: | - @driver.find_element(:accessibility_id, 'SomeAccessibilityID').tag_name + // TODO Ruby sample php: | // TODO PHP sample @@ -60,7 +58,7 @@ client_support: # Information about the HTTP endpoints endpoint: - url: /wd/hub/session/:session_id/elements/:element_id/name + url: /wd/hub/session/:session_id/element/:element_id/pageIndex method: 'GET' url_parameters: - name: session_id @@ -73,5 +71,4 @@ endpoint: # Links to specifications. Should link to at least one specification specifications: - w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-tag-name - jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidname + jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L285 diff --git a/commands-yml/commands/element/attributes/rect.yml b/commands-yml/commands/element/attributes/rect.yml index 6e0abfd43..d54153fe6 100644 --- a/commands-yml/commands/element/attributes/rect.yml +++ b/commands-yml/commands/element/attributes/rect.yml @@ -14,6 +14,10 @@ example_usage: javascript_wdio: | let rect = driver.elementIdRect("~SomeAccessibilityId"); + ruby: + | + element = @driver.find_element :accessibility_id, "SomeAccessibilityID" + element.rect php: | // TODO PHP sample @@ -24,6 +28,7 @@ example_usage: client_docs: java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getRect--" javascript_wdio: "http://webdriver.io/api/protocol/elementIdRect.html" + ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#rect-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/element/attributes/replace-value.yml b/commands-yml/commands/element/attributes/replace-value.yml index e9cc3f68b..7d520009a 100644 --- a/commands-yml/commands/element/attributes/replace-value.yml +++ b/commands-yml/commands/element/attributes/replace-value.yml @@ -1,29 +1,27 @@ --- -name: Get Element Text -short_description: Returns visible text for element +name: Replace the value +short_description: Replace the value to element directly description: > - Returns the visible text for the element. + Replace the value to element directly. example_usage: java: | - MobileElement element = (MobileElement) driver.findElementByClassName("SomeClassName"); - let elText = element.getText(); + // TODO Java sample python: | - # el = self.driver.find_element_by_accessibility_id('SomeId') - # TODO: Python example + // TODO: Python example javascript_wd: | - let element = await driver.elementByAccessibilityId("SomeAccessibilityID"); - await element.submit(); + // TODO JavaScript sample javascript_wdio: | - driver.getText("~SomeAccessibilityId"); + // TODO JavaScript sample ruby: | - # TODO Ruby sample + element = @driver.find_element :accessibility_id, "SomeAccessibilityID" + @driver.replace_value element, 'some' php: | // TODO PHP sample @@ -32,11 +30,11 @@ example_usage: // TODO C# sample client_docs: - java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getText--" + java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getText--" # TODO Java documentation link python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link - javascript_wdio: "http://webdriver.io/api/property/getText.html" - javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1832" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO Ruby documentation link + javascript_wdio: "http://webdriver.io/api/property/getText.html" # TODO JAvaScript documentation link + javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1832" # TODO JAvaScript documentation link + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#replace_value-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link @@ -64,15 +62,18 @@ client_support: # Information about the HTTP endpoints endpoint: - url: /wd/hub/session/:session_id/element/:element_id/value + url: /wd/hub/session/:session_id/appium/element/:element_id/replace_value method: 'POST' url_parameters: - name: session_id description: ID of the session to route the command to - name: element_id description: ID of the element to get the text from + json_parameters: + - name: value + type: array + description: The sequence of keys to type. An array must be provided. The server should flatten the array items to a single string to be typed. # Links to specifications. Should link to at least one specification specifications: - w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-text - jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue + jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L451 diff --git a/commands-yml/commands/element/attributes/selected.yml b/commands-yml/commands/element/attributes/selected.yml index b4a740f62..7eb23ab4a 100644 --- a/commands-yml/commands/element/attributes/selected.yml +++ b/commands-yml/commands/element/attributes/selected.yml @@ -18,7 +18,7 @@ example_usage: let isSelected = driver.isSelected("~SomeAccessibilityId"); ruby: | - @driver.find_element(:accessibility_id, "SomeAccessibilityID").selected?() + @driver.find_element(:accessibility_id, "SomeAccessibilityID").selected? php: | // TODO PHP sample diff --git a/commands-yml/commands/element/attributes/text.yml b/commands-yml/commands/element/attributes/text.yml index 03fbd20a0..06ffb9287 100644 --- a/commands-yml/commands/element/attributes/text.yml +++ b/commands-yml/commands/element/attributes/text.yml @@ -23,7 +23,8 @@ example_usage: driver.getText("~SomeAccessibilityId"); ruby: | - # TODO Ruby sample + element = @driver.find_element :accessibility_id, "SomeAccessibilityID" + element.text php: | // TODO PHP sample @@ -36,7 +37,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link javascript_wdio: "http://webdriver.io/api/property/getText.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1832" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO Ruby documentation link + ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#text-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/element/find-elements.yml b/commands-yml/commands/element/find-elements.yml index f4666ea68..aa3bfc906 100644 --- a/commands-yml/commands/element/find-elements.yml +++ b/commands-yml/commands/element/find-elements.yml @@ -36,7 +36,7 @@ example_usage: driver.elements("~SomeAccessibilityId"); ruby: | - @driver.find_elements("~SomeAccessibilityID") + @driver.find_elements(:accessibility_id, "~SomeAccessibilityID") php: | // TODO PHP sample diff --git a/commands-yml/commands/element/other/active.yml b/commands-yml/commands/element/other/active.yml index fe988a4fc..486fe214a 100644 --- a/commands-yml/commands/element/other/active.yml +++ b/commands-yml/commands/element/other/active.yml @@ -17,7 +17,7 @@ example_usage: driver.elementActive(); ruby: | - # TODO Ruby example + @driver.switch_to.active_element php: | // TODO PHP example @@ -30,7 +30,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html?highlight=active_element#selenium.webdriver.remote.webdriver.WebDriver.switch_to_active_element" # TODO javascript_wdio: "http://webdriver.io/api/protocol/elementActive.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1934" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO + ruby: "http://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/TargetLocator#active_element-instance_method" php: "https://github.com/appium/php-client/" # TODO csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO diff --git a/commands-yml/commands/element/other/equals-element.yml b/commands-yml/commands/element/other/equals-element.yml index 2ba0e0ae4..e675015b1 100644 --- a/commands-yml/commands/element/other/equals-element.yml +++ b/commands-yml/commands/element/other/equals-element.yml @@ -23,7 +23,9 @@ example_usage: # TODO WDIO example ruby: | - # TODO Ruby example + element1 = @driver.find_element :class_name, "someClass" + element2 = @driver.find_element :class_name, "someOtherClass" + element1 == element2 php: | // TODO PHP sample @@ -36,7 +38,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link javascript_wdio: "http://webdriver.io/api/state/isEnabled.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1463" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#enabled%3F-instance_method" + ruby: "http://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Element#==-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/element/other/submit.yml b/commands-yml/commands/element/other/submit.yml index 95e397ede..1996e2fa8 100644 --- a/commands-yml/commands/element/other/submit.yml +++ b/commands-yml/commands/element/other/submit.yml @@ -23,7 +23,8 @@ example_usage: driver.submitForm("~SomeAccessibilityId"); ruby: | - # TODO Ruby sample + element = @driver.find_element :class_name, "someClass" + element.submit element php: | // TODO PHP sample @@ -36,7 +37,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.submit" javascript_wdio: "http://webdriver.io/api/action/submitForm.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1741" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO Ruby documentation link + ruby: "http://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Element#submit-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/session/back.yml b/commands-yml/commands/session/back.yml index e345bdeaf..e701ddcf4 100644 --- a/commands-yml/commands/session/back.yml +++ b/commands-yml/commands/session/back.yml @@ -17,7 +17,7 @@ example_usage: driver.back(); ruby: | - @driver.back() + @driver.back php: | // TODO PHP sample diff --git a/commands-yml/commands/session/delete.yml b/commands-yml/commands/session/delete.yml index 2d53dcd6d..b54451e35 100644 --- a/commands-yml/commands/session/delete.yml +++ b/commands-yml/commands/session/delete.yml @@ -18,7 +18,7 @@ example_usage: driver.end(); ruby: | - @driver.quit(); + @driver.quit php: | // TODO PHP sample diff --git a/commands-yml/commands/session/geolocation/get-geolocation.yml b/commands-yml/commands/session/geolocation/get-geolocation.yml index 4dd352eef..0d453b03b 100644 --- a/commands-yml/commands/session/geolocation/get-geolocation.yml +++ b/commands-yml/commands/session/geolocation/get-geolocation.yml @@ -18,7 +18,7 @@ example_usage: let location = driver.location(); ruby: | - @driver.location() + @driver.location php: | // TODO PHP sample diff --git a/commands-yml/commands/session/get.yml b/commands-yml/commands/session/get.yml index d644eae54..934e429b7 100644 --- a/commands-yml/commands/session/get.yml +++ b/commands-yml/commands/session/get.yml @@ -18,7 +18,7 @@ example_usage: let caps = driver.session('c8db88a0-47a6-47a1-802d-164d746c06aa'); ruby: | - @driver.session_capabilities() + @driver.session_capabilities php: | // TODO PHP sample diff --git a/commands-yml/commands/session/logs/get-log-types.yml b/commands-yml/commands/session/logs/get-log-types.yml index 98e35b0ec..bf48db3c4 100644 --- a/commands-yml/commands/session/logs/get-log-types.yml +++ b/commands-yml/commands/session/logs/get-log-types.yml @@ -18,7 +18,7 @@ example_usage: driver.log() ruby: | - log_types = @driver.logTypes + @driver.get_available_log_types php: | // TODO PHP sample @@ -31,7 +31,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.log_types" javascript_wdio: "http://webdriver.io/api/protocol/logTypes.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L441" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FRemote%2FOSS%2FBridge:available_log_types" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Common#get_available_log_types-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/session/logs/get-log.yml b/commands-yml/commands/session/logs/get-log.yml index b0b54f990..ed8741a59 100644 --- a/commands-yml/commands/session/logs/get-log.yml +++ b/commands-yml/commands/session/logs/get-log.yml @@ -18,7 +18,7 @@ example_usage: let logs = driver.log('driver') ruby: | - @driver.logs('driver') + @driver.get_log('driver') php: | // TODO PHP sample @@ -31,7 +31,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.get_log" javascript_wdio: "http://webdriver.io/api/protocol/log.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L455" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:scroll" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Common#get_log-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/session/orientation/get-orientation.yml b/commands-yml/commands/session/orientation/get-orientation.yml index ca7643134..efeaf12b3 100644 --- a/commands-yml/commands/session/orientation/get-orientation.yml +++ b/commands-yml/commands/session/orientation/get-orientation.yml @@ -18,7 +18,7 @@ example_usage: let orientation = driver.orientation(); ruby: | - @driver.orientation() + @driver.orientation php: | // TODO PHP sample diff --git a/commands-yml/commands/session/orientation/set-orientation.yml b/commands-yml/commands/session/orientation/set-orientation.yml index 50938cfa1..9dd383ecc 100644 --- a/commands-yml/commands/session/orientation/set-orientation.yml +++ b/commands-yml/commands/session/orientation/set-orientation.yml @@ -18,7 +18,7 @@ example_usage: driver.orientation("LANDSCAPE"); ruby: | - @driver.orientation("LANDSCAPE") + @driver.rotation = :landscape php: | // TODO PHP sample diff --git a/commands-yml/commands/session/settings/get-settings.yml b/commands-yml/commands/session/settings/get-settings.yml index 94bf87234..506a1abd2 100644 --- a/commands-yml/commands/session/settings/get-settings.yml +++ b/commands-yml/commands/session/settings/get-settings.yml @@ -11,11 +11,15 @@ example_usage: javascript_wdio: | let settings = driver.settings(); + ruby: + | + @driver.get_settings client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/HasSettings.html#getSettings--" javascript_wdio: "http://webdriver.io/api/mobile/settings.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3018" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#get_settings-instance_method" # Driver support by platform driver_support: diff --git a/commands-yml/commands/session/settings/update-settings.yml b/commands-yml/commands/session/settings/update-settings.yml index 14ed7bb5a..26d55e841 100644 --- a/commands-yml/commands/session/settings/update-settings.yml +++ b/commands-yml/commands/session/settings/update-settings.yml @@ -11,11 +11,15 @@ example_usage: javascript_wdio: | driver.settings({nativeWebTap: true}); + ruby: + | + @driver.update_settings(sample: 'value') client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/HasSettings.html#setSetting-io.appium.java_client.Setting-java.lang.Object-" javascript_wdio: "http://webdriver.io/api/mobile/settings.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3032" + ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#update_settings-instance_method" # Driver support by platform driver_support: diff --git a/commands-yml/commands/session/timeouts/implicit-wait.yml b/commands-yml/commands/session/timeouts/implicit-wait.yml index a4e0338e0..85b4344a1 100644 --- a/commands-yml/commands/session/timeouts/implicit-wait.yml +++ b/commands-yml/commands/session/timeouts/implicit-wait.yml @@ -27,7 +27,7 @@ example_usage: driver.timeoutsImplicitWait(5000) ruby: | - @driver.implicit_wait(5) # Ruby translates it to seconds + @driver.manage.timeouts.implicit_wait = 5 # Ruby translates it to seconds php: | // TODO PHP sample diff --git a/commands-yml/commands/session/timeouts/timeouts.yml b/commands-yml/commands/session/timeouts/timeouts.yml index 4082f884f..8b944a1cd 100644 --- a/commands-yml/commands/session/timeouts/timeouts.yml +++ b/commands-yml/commands/session/timeouts/timeouts.yml @@ -22,7 +22,7 @@ example_usage: driver.timeouts('pageLoad', 5000) ruby: | - @driver.page_load(5) # Ruby translates it to seconds + @driver.timeout('pageLoad', 5) # Ruby translates it to seconds php: | // TODO PHP sample @@ -35,7 +35,7 @@ client_docs: python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.set_page_load_timeout" javascript_wdio: "http://webdriver.io/guide/testrunner/timeouts.html#Selenium-timeouts" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L714" - ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Timeouts:page_load=" + ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Remote/OSS/Bridge#timeout-instance_method" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link diff --git a/commands-yml/commands/status.yml b/commands-yml/commands/status.yml index acd30d5ee..cd4f66b02 100644 --- a/commands-yml/commands/status.yml +++ b/commands-yml/commands/status.yml @@ -21,7 +21,8 @@ example_usage: driver.status(); ruby: | - # TODO + @driver.remote_status + remote_status php: | // TODO diff --git a/commands-yml/commands/web/frame/parent.yml b/commands-yml/commands/web/frame/parent.yml index 2f8a81793..ff6a62316 100644 --- a/commands-yml/commands/web/frame/parent.yml +++ b/commands-yml/commands/web/frame/parent.yml @@ -18,7 +18,7 @@ example_usage: driver.frameParent(); ruby: | - @driver.parent_frame() + @driver.parent_frame php: | // TODO PHP sample diff --git a/commands-yml/commands/web/navigation/back.yml b/commands-yml/commands/web/navigation/back.yml index db735c443..49def09ae 100644 --- a/commands-yml/commands/web/navigation/back.yml +++ b/commands-yml/commands/web/navigation/back.yml @@ -17,7 +17,7 @@ example_usage: driver.back(); ruby: | - @driver.back() + @driver.back php: | // TODO PHP sample diff --git a/commands-yml/commands/web/navigation/forward.yml b/commands-yml/commands/web/navigation/forward.yml index c56e64c21..bf212c57f 100644 --- a/commands-yml/commands/web/navigation/forward.yml +++ b/commands-yml/commands/web/navigation/forward.yml @@ -17,7 +17,7 @@ example_usage: driver.forward(); ruby: | - @driver.forward() + @driver.forward php: | // TODO PHP sample diff --git a/commands-yml/commands/web/navigation/refresh.yml b/commands-yml/commands/web/navigation/refresh.yml index 62950e8a7..82dc677c2 100644 --- a/commands-yml/commands/web/navigation/refresh.yml +++ b/commands-yml/commands/web/navigation/refresh.yml @@ -17,7 +17,7 @@ example_usage: driver.refresh(); ruby: | - @driver.refresh() + @driver.refresh php: | // TODO PHP sample diff --git a/commands-yml/commands/web/storage/delete-all-cookies.yml b/commands-yml/commands/web/storage/delete-all-cookies.yml index 9a86453b4..fc86603eb 100644 --- a/commands-yml/commands/web/storage/delete-all-cookies.yml +++ b/commands-yml/commands/web/storage/delete-all-cookies.yml @@ -17,7 +17,7 @@ example_usage: driver.cookie("delete"); ruby: | - @driver.delete_all_cookies() + @driver.delete_all_cookies php: | // TODO PHP sample