需要修改的是
platformVersion
deviceName
demo:
#coding=utf-8 from appium import webdriver import time desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '5.0.2' desired_caps['deviceName'] = 'QOKNIFPV99999999' desired_caps['appPackage'] = 'com.android.bbkcalculator' desired_caps['appActivity'] = 'com.android.bbkcalculator.Calculator' driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) driver.find_element_by_id("com.android.bbkcalculator:id/digit1").click() driver.find_element_by_id("com.android.bbkcalculator:id/plus").click() driver.find_element_by_id("com.android.bbkcalculator:id/digit9").click() driver.find_element_by_id("com.android.bbkcalculator:id/equal").click() time.sleep(5) driver.quit()