appium启动APP时避免重新安装的问题


from appium import webdriver
from time import sleep
import os

#获取apk的绝对路径
desired_cups = {}
#设备平台
desired_cups['platformName'] = 'Android'
#设备系统版本
desired_cups['platformVersion'] = '4.4.2'
#设备名称
desired_cups['deviceName'] = 'HuaWei'
#APK
desired_cups['appPackage'] = 'com.tencent.mm'
#APKactivity
desired_cups['appActivity'] = 'com.tencent.mm.ui.LauncherUI'
#不需要再次签名
desired_cups['noSign'] = 'True'
#不需要清理数据,避免重新安装的问题
desired_cups['noReset'] = 'True'

print desired_cups
driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_cups)
sleep(10)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM