gpt4 book ai didi

python - 在 UIAutomator 中设置文本

转载 作者:太空宇宙 更新时间:2023-11-04 07:37:09 32 4
gpt4 key购买 nike

我刚刚探索用于 Android 应用程序测试的 UIAutomator 并遇到了这个问题。

基于 API。

https://github.com/xiaocong/uiautomator#screen-actions-of-the-device

作为探索的一部分,我正在尝试以编程方式添加新联系人。

enter image description here

我已使用此代码到达此页面。

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/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com