press_keycode on sauce labs

I’m running into an issue on sauce labs when passing the Menu keycode for android. I’m using appium_lib and I’ve tried both press_keycode and long_press_keycode methods. For the life of me, I cannot find the raw uiautomator method to interact with the android keyboard. press_keycode works fine on real android device and local emulator but breaks in sauce labs. Anyone know a work around to tap the android Menu / Options button?

2.1.1 :512 > long_press_keycode 82
Selenium::WebDriver::Error::WebDriverError: unexpected response, code=404, content-type=“text/plain”
That URL did not map to a valid JSONWP resource

Make sure you’re using the newest version of appium. Saucelabs still defaults to appium v0.18. Use the appium-version capability.

Thank you! I was passing the :appium-version but it was set to 1.1.1 which I totally missed. press_keycode works now on sauce. :smile:

1 Like