When running automated tests using Appium 2.2.2 and trying to move the cursor with pressKeyCode, the cursor moves continuously even though I only call it once. It looks like it’s a long press.
await driver.pressKeyCode(108); // Down
await driver.pause(1000);
I checked with the vega-video-sample-main app and it’s the same.
Please tell me how to fix this problem. Thank you!
Below is the environment information.
Vega SDK : 0.21.4726
Appium version : 2.2.2
Appium driver : 3.30.0
Thank you for your patience while we investigated this issue.
We were able to reproduce and resolve the problem you reported with pressKeyCode on Kepler Appium. The issue was caused by the default key press duration being set to 1 second in the AppiumKeplerDriver code, which is too long and causes the continuous scrolling behavior you observed.
Solution:
We’ve identified the necessary code changes to fix this issue. I’ve attached a test file test_appium_issue.py (1.0 KB) that demonstrates the corrected implementation with the adjusted key press duration.
Please review the attached file and let us know if this resolves your issue or if you need any further assistance.