分类: Android平台
2017-02-10 13:12:44
> npm install wd # get appium client
> appium & # start appium
3. 安装Appium-Python-Client
pip install Appium-Python-Client
4.AndroidSDK加入到环境变量
ANDROID_HOME:D:\AndroidSDK\sdk
5.编写python脚本
from appium import webdriver desired_caps = { 'platformName': 'Android', 'platformVersion': '4.4.2', 'deviceName': 'Nexus_5X', 'appPackage': 'com.google.android.calculator', 'appActivity': 'com.android.calculator2.CalculatorGoogle' } driver = webdriver.Remote('', desired_caps) driver.find_element_by_name("1").click() driver.quit()