Macaca 默认的 chromedriver2.20 执行 chrome 浏览器版本 61 报错的问题,解决办法

金龙 · October 10, 2017 · Last by 金龙 replied at November 02, 2017 · 3454 hits

最近开始折腾macaca,配置好环境后,运行桌面chrome浏览器的demo报错,no such session....
参考了文章:https://testerhome.com/topics/9057

我本机的环境是mac

  1. chrome版本 61.0.3163.100(正式版本) (64 位)
  2. 安装macaca默认的chromedriver版本:chromedriver2.20

chromedriver版本支持参考下面地址:
参考:http://blog.csdn.net/cz9025/article/details/70160273

  • 最新的chromedriver已经到了2.33,支持chrome60-62

操作步骤如下:

  1. 下载chromedriver2.33版本(对应版本)
  2. 替换原桌面版chromedriver,我的位置是:/usr/local/lib/node_modules/macaca-chrome/node_modules/macaca-chromedriver/exec 注意:名字必须是chromedriver2.20,虽然版本是2.33
  3. 重启macaca server

疑问
我selenium的chromedriver版本是2.28,当运行chrome61,没有问题,不知道为什么macaca不可以。

共收到 4 条回复 时间 点赞

@hivencent 麻烦楼主贴一下你的 macaca doctor 看一下吧,看下各个版本的对应,谢谢。

KD 回复

感谢,使用楼主方法亲测成功。Google Chrome 61.0.3163.100 (正式版本) (64 位) (cohort: Stable)
本人macaca doctor 信息如下,供参考:

C:\Users\KingDow>macaca doctor

macaca-doctor version: 2.0.3


Node.js checklist:

node env: C:\Program Files\nodejs\node.exe
node version: v8.2.1

Android checklist:

JAVA version is `1.8.0_141`
JAVA_HOME is set to `E:\WORKTOOLS\jdk\jdk-8u141-windows-x64`
ANDROID_HOME is set to `E:\autoTest\macaca\tools-new\sdk`
Platforms is set to `E:\autoTest\macaca\tools-new\sdk\platforms\android-26`
ADB tool is set to `E:\autoTest\macaca\tools-new\sdk\platform-tools\adb.exe`
GRADLE_HOME is set to `E:\autoTest\macaca\tools-new\gradle\gradle-4.0.1`

Installed driver list:

android: 2.0.40
chrome: 1.0.7
electron: 1.1.11
ios: 2.0.24

More information: https://macacajs.github.io/changelog.html

macaca-doctor version: 2.0.3

Node.js checklist:

node env: /usr/local/bin/node
node version: v6.11.3

iOS checklist:

Xcode Command Line Tools require version: 2347 and above
xcodebuild version: 7.2.1 lower than 8.3.2
{ Error: Command failed: which iproxy

at ChildProcess.exithandler (child_process.js:198:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket. (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close as _onclose killed: false, code: 1, signal: null, cmd: 'which iproxy' }
Command Line Tools: iproxy[usbmuxd] is uninstalled
Command Line Tools: ios_webkit_debug_proxy is uninstalled
carthage is uninstalled

Android checklist:

JAVA version is 1.8.0_131
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
ANDROID_HOME is set to /Users/jinlong/Library/Android/sdk
Platforms is set to /Users/jinlong/Library/Android/sdk/platforms/android-26
ADB tool is set to /Users/jinlong/Library/Android/sdk/platform-tools/adb
gradle is installed, version: 3.5

Installed driver list:

android: 2.0.40
chrome: 1.0.6 [out-of-date]
electron: 1.1.11 [out-of-date]
ios: 2.0.24 [out-of-date]

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up