2024-09-27 22:23:04 发布
网友
我是python自动机的初学者
我在试着写些代码。你知道吗
我只找到这个代码“d.press(0x07)”,它将在驱动器上打印(0)。 但我想知道我能用的其他号码,或者用印刷机能打印出来的号码,比如:(a,b,c,d)在我的设备上?你知道吗
[顺便说一句,我知道“.set_text”这样,但我想使用“d.press()”]
python-uiautomator
from uiautomator import device as d d.press(0x07) sleep(1)
“”“
根据https://github.com/xiaocong/uiautomator
# press home key d.press.home() # press back key d.press.back() # the normal way to press back key d.press("back") # press keycode 0x07('0') with META ALT(0x02) on d.press(0x07, 0x02)
这里定义了更多代码https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_0
根据https://github.com/xiaocong/uiautomator
这里定义了更多代码https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_0
相关问题 更多 >
编程相关推荐