如何从Appium中的Android键盘中选择“确定”按钮

问题描述 投票:0回答:1

我正在尝试单击“确定”按钮,即Android设备中的刻度线,但由于键盘没有任何xpath值,因此它正在发生。有人可以帮我吗?enter image description here

appium appium-android python-appium
1个回答
0
投票

对鸦片的按键操作由driver.press_keycode(code)

All required codes can be found here

  • 66-KEYCODE_ENTER

因此,在您的情况下,最终的代码是,

driver.press_keycode(66)

© www.soinside.com 2019 - 2024. All rights reserved.