python_appium_模拟器启动app进行登录

#coding=utf-8
from appium import webdriver
import time
desired_caps = {} #列表
desired_caps[‘platformName‘] = ‘Android‘ #安卓的
desired_caps[‘platformVersion‘] = ‘6.0‘  #安卓版本
desired_caps[‘deviceName‘] = ‘Android Emulator‘  #模拟器Emulator
desired_caps[‘appPackage‘] = ‘com.changhong.app‘  #测试的包名
desired_caps[‘appActivity‘] = ‘com.iwant.ui.SplashActivity‘  #启动app的activity
driver = webdriver.Remote(‘http://127.0.0.1:4723/wd/hub‘, desired_caps) #本地路径
time.sleep(5)


使用的是SDK自带模拟器6.0 元素定位是UI Automatorview

python_appium_模拟器启动app进行登录

上一篇:MySql报Packet for query is too large错误


下一篇:Error: Default interface methods are only supported starting with Android N (--min-api 24): java.io.InputStream org.apache.poi.sl.usermodel.ObjectShape.readObjectData()