from appium import webdriver
desired_caps = {}
desired_caps['platformName'] = 'Android' 测试的手机操作系统
desired_caps['platformVersion'] = '5.1.1' 手机操作系统版本
desired_caps['deviceName'] = '127.0.0.1:21503' 手机类型或模拟器类型(通过adb devices查看)
desired_caps['appPackage'] = 'com.ss.android.article.news' 包名(都通过 adb shell dumpsys activity top|findstr “ACTIVITY”来查看)
desired_caps['appActivity'] = '.activity.MainActivity' activity名
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)