[英]Keyevent doesn't work
I have a problem with keyevents when I try to press the home button. 尝试按“主页”按钮时,键盘事件有问题。
Where is the bug? 错误在哪里?
driver.execute_script("mobile: keyevent", {"keycode": 3})
I use python and appium. 我使用python和appium。
The solution to the problem were extra spaces. 解决该问题的方法是增加空间。 The code should look like this:
该代码应如下所示:
driver.execute_script("mobile: keyevent",{ "keycode": 3 })
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.