【发布时间】:2016-12-28 13:47:32
【问题描述】:
我在 python 中为安卓手机使用 Uiautomator 工具。 但是,现在我有兴趣在 android TV 上使用它。
我为安卓电视做了和安卓手机一样的设置。 但我发现message_app.click() 在电视上不起作用。
下面是我的代码sn-p
from uiautomator import Device
d = Device('SerialNumberOfDevice')
message_app = d(className=”android.widget.TextView”, description=”Messaging”) #initialize message app
message_app.click()
我怀疑,这是因为 click() 被实现为“触摸事件”。 但是,在电视中,我们不会使用“触摸事件”,而是使用遥控器。
有没有办法为安卓电视实现 click()。
提前致谢。
【问题讨论】:
标签: android python ui-automation android-uiautomator