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)