python MonkeyRunner和AndroidViewClient示例。检测呼叫是否即将到来。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python MonkeyRunner和AndroidViewClient示例。检测呼叫是否即将到来。相关的知识,希望对你有一定的参考价值。

import sys

# put jar into sys.path
sys.path.append(os.path.join("your_path", "androidviewclient-2.3.25.jar"))

from com.dtmilano.android.viewclient import ViewClient

# if you connect multiple device, you can specify serialno
# you can get serialno via 'adb devices'
device, serialno = ViewClient.connectToDeviceOrExit(
    verbose=True,
    serialno=serialno)
vc = ViewClient(
    device=self.device,
    serialno=serialno)

# Must call dump() to refresh vc.root
vc.dump()
widget = self.vc.findViewWithText('Incoming call')

以上是关于python MonkeyRunner和AndroidViewClient示例。检测呼叫是否即将到来。的主要内容,如果未能解决你的问题,请参考以下文章

python MonkeyRunner和AndroidViewClient示例。检测呼叫是否即将到来。

转载:monkeyrunner之eclipse中运行monkeyrunner脚本之环境搭建

Python MonkeyRunner 连接设备总是返回连接成功问题

monkeyrunner环境配置

MonkeyRunner简介

java+monkeyrunner+Python痒痒鼠脚本软件