question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Appium helper] I.sendDeviceKeyEvent and I.setOrientation didn't work anymore with webdriver@5.x.x

See original GitHub issue

What are you trying to achieve?

Subject is simple - I.sendDeviceKeyEvent and I.setOrientation didn’t work anymore with webdriver @5.x.x

What do you get instead?

Malformed type for "keycode" parameter of command sendKeyEvent
Expected: string
Actual: number

For more info see https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints
  
Scenario Steps:
  - I.sendDeviceKeyEvent(4) at Test.Scenario (tests/smokenext_test.js:22:5)

Details

  • CodeceptJS version: 2.x.x (2.0.6)
  • NodeJS Version: 11.10.0
  • Operating System: MacOS
  • Protractor || WebDriverIO || Nightmare version (if related) webdriver @5.x.x
  • Configuration file: doesn’t matter

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
elukoyanovcommented, Mar 1, 2019

No matter, ios or android

1reaction
Solganiscommented, Feb 26, 2019

Thanh Nguyen (from slack CodeceptJS channel) helped me with this and he solve a problem with I.sendDeviceKeyEvent(); Solution is simple - put number inside single quotes …

Before - I.sendDeviceKeyEvent(4); After - I.sendDeviceKeyEvent(‘4’); v4: http://v4.webdriver.io/api/mobile/deviceKeyEvent.html v5: https://webdriver.io/docs/api/appium.html#sendkeyevent

but for I.setOrientation - “it seems that v5 doesn’t have same api for setOrientation“. So there is still room to dig deeper.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Appium helper] I.sendDeviceKeyEvent and I.setOrientation ...
Subject is simple - I.sendDeviceKeyEvent and I.setOrientation didn't work anymore with webdriver @5.x.x What do you get instead?
Read more >
Undefined method `key_event' for Appium::Driver - Support
Hello, I'm trying to open the Menu in Android phone with Appium and Ruby. I've tried all functions (keyevent, key_event, with and without...
Read more >
Sendkeys fails on android appium driver - Stack Overflow
I can send keys to the android text field, by typing on android keyboard with AppiumDriver.sendKeyEvent(int key): driver.
Read more >
Top 50 Selendroid interview questions and answers
Appium is a freely distributed open source mobile application UI ... are available only in Xcode 3.0 or later with OS X v10.5...
Read more >
Using Selenium To Test Mobile? Meet Appium - YouTube
In this how-to webinar, we will show you how you can utilize your Selenium skills to scale your mobile testing with Appium.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found