官网对于appium支持chromedriver的文档:
chromedriver 各版本下载
启动appium时 开启自动下载chromedriver命令:(这样就不用关心版本问题了)
appium --allow-insecure chromedriver_autodownload
desired_caps添加如下 chromedriver 保存目录(是目录 不是文件)
self.desired_caps = {
"platformName": "Android",
"platformVersion": "10",
"deviceName": "8BNGK17907000030",
"appPackage": "com.coolclub.dk",
"appActivity": "com.kk.duoku.ui.activitys.MainActivity",
"resetKeyboard": True, # 重置输入法到初始状态
"noReset": True, # 是否不重置应用
"unicodeKeyboard": True, # 是否可以输入中文
"automationName": "UiAutomator2",
"chromeOptions": {'androidProcess': 'com.nuomi'},
"chromedriverExecutableDir": r"D:\soft_install\Appium-windows-1.21.0\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win"
# "chromedriverExecutableDir": r"D:\常用-软件\Appium-windows-1.21.0\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win",
}
?
|