我刚刚探索用于 Android 应用程序测试的 UIAutomator 并遇到了这个问题。
基于 API。
https://github.com/xiaocong/uiautomator#screen-actions-of-the-device
作为探索的一部分,我正在尝试以编程方式添加新联系人。
我已使用此代码到达此页面。
from uiautomator import device as d
d.click(x,y) #used to click all the way to contacts.
如何将文本插入名称文本框?由于我不知道类图像并且github上的例子也不多。
最佳答案
根据文档,应该是
d(text="Settings").set_text("My text...") # set the text
关于python - 在 UIAutomator 中设置文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32068527/