Fix some incorrect APIs for Javascript
MODIFY
commands-yml/commands/context/set-context.yml
commands-yml/commands/context/set-context.yml
@@ -35,9 +35,9 @@ example_usage:
javascript_wdio:
|
let contexts = driver.getContexts();
- driver.setContext(contexts[1]);
+ driver.switchContext(contexts[1]);
// ...
- driver.setContext('NATIVE_APP');
+ driver.switchContext('NATIVE_APP');
ruby:
|
webview = available_contexts[1]
@@ -71,7 +71,7 @@ example_usage:
client_docs:
java: "https://appium.github.io/java-client/io/appium/java_client/AppiumDriver.html#context-java.lang.String-"
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_wdio: "https://webdriver.io/docs/api/mjsonwp.html#switchcontext"
javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md"
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#set_context-instance_method"
ruby_core: "https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#set_context-instance_method"

MODIFY
commands-yml/commands/device/keys/long-press-keycode.yml
commands-yml/commands/device/keys/long-press-keycode.yml
@@ -16,7 +16,7 @@ example_usage:
driver.longPressKeyCode(10);
javascript_wd:
|
- await driver.longPressKeyCode(10);
+ await driver.longPressKeycode(10);
ruby:
|
long_press_keycode(10)
@@ -33,7 +33,7 @@ example_usage:
client_docs:
java: "https://appium.github.io/java-client/io/appium/java_client/windows/PressesKeyCode.html#longPressKeyCode-int-"
python: "https://github.com/appium/python-client/blob/master/README.md#long_press"
- javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html"
+ javascript_wdio: "https://webdriver.io/docs/api/appium.html#longpresskeycode"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2478"
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#long_press_keycode-instance_method"
ruby_core: "https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#long_press_keycode-instance_method"

MODIFY
commands-yml/commands/device/keys/press-keycode.yml
commands-yml/commands/device/keys/press-keycode.yml
@@ -13,7 +13,7 @@ example_usage:
self.driver.press_keycode(10);
javascript_wdio:
|
- driver.pressKeycode(10);
+ driver.pressKeyCode(10);
javascript_wd:
|
await driver.pressKeycode(10);
@@ -33,7 +33,7 @@ example_usage:
client_docs:
java: "https://appium.github.io/java-client/io/appium/java_client/windows/PressesKeyCode.html#pressKeyCode-int-"
python: "https://github.com/appium/python-client/blob/master/README.md#sending-a-key-event-to-an-android-device"
- javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html"
+ javascript_wdio: "https://webdriver.io/docs/api/appium.html#presskeycode"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2457"
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#press_keycode-instance_method"
ruby_core: "https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#press_keycode-instance_method"

Fix some incorrect APIs for Javascript (#13527)