سؤال

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.

هل كانت مفيدة؟

المحلول

The solution to the problem were extra spaces. The code should look like this:

driver.execute_script("mobile: keyevent",{ "keycode": 3 })
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top