【问题标题】:No Chromedriver found that can automate Chrome '53.0.2785'没有找到可以自动化 Chrome '53.0.2785' 的 Chromedriver
【发布时间】:2019-02-01 00:51:14
【问题描述】:

问题:我正在尝试在 android 模拟器上运行 appium 自动化,应用程序启动但错误提示 No chromedriver found。

我能够早一点跑步,就像上个月一样。但现在它让我犯了一个错误,可能是因为对 appium 或 chromedriver 或 android 的一些更新。

Appium 版本 - 1.8.1 操作系统:Mac 平台:安卓

尝试了各种选项,例如,降级 appium 版本,将 chromedriver 版本更改为更低版本。各种帖子建议,没有一个有明确和适当的解决方法

    [debug] [ADB] Device API level: 24
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-n","com.sparkletech.app/com.sparkletech.app.MainActivity","-S","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[debug] [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[Appium] New AndroidDriver session created successfully, session fa4f13cc-80b2-4db1-b417-cd13798ee4af added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1535255463650 (13:51:03 GMT+1000 (Australian Eastern Standard Time))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appPackage":"com.sparkletech.app","app":null,"noReset":true,"deviceName":"emulator-5554","appActivity":"com.sparkletech.app.MainActivity","build":"local-null","platformVersion":"7.0","name":"Swipe on Onboarding Carousel","browserName":"","platformName":"Android","printPageSourceOnFindFailure":"true","browserstack.debug":"true"},"appPackage":"com.sparkletech.app","app":null,"noReset":true,"deviceName":"emulator-5554","appActivity":"com.sparkletech.app.MainActivity","build":"local-null","platformVersion":"7.0","name":"Swipe on Onboarding Carousel","browserName":"","platformName":"Android","printPageSourceOnFindFailure":"true","browserstack.debug":"true","deviceUDID":"emulator-5554","deviceScreenSize":"1080x1920","deviceModel":"Android SDK built for x86","deviceManufacturer":"Google"}
[HTTP] <-- POST /wd/hub/session 200 5238 ms - 1071 
[HTTP] --> GET /wd/hub/session/fa4f13cc-80b2-4db1-b417-cd13798ee4af/contexts {}
[debug] [MJSONWP] Calling AppiumDriver.getContexts() with args: ["fa4f13cc-80b2-4db1-b417-cd13798ee4af"]
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","cat","/proc/net/unix"]
[debug] [AndroidDriver] WEBVIEW_9844 mapped to pid 9844
[debug] [AndroidDriver] Getting process name for webview
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[debug] [AndroidDriver] Parsed pid: '9844' pkg: 'S' from
[debug] [AndroidDriver]     USER      PID   PPID  VSIZE  RSS   WCHAN            PC  NAME
[debug] [AndroidDriver]     u0_a82    9844  1373  1510484 92776 futex_wait 00000000 S com.sparkletech.app
[debug] [AndroidDriver] Returning process name: 'S'
[debug] [AndroidDriver] Found webviews: ["WEBVIEW_S"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_S"]
[debug] [MJSONWP] Responding to client with driver.getContexts() result: ["NATIVE_APP","WEBVIEW_S"]
[HTTP] <-- GET /wd/hub/session/fa4f13cc-80b2-4db1-b417-cd13798ee4af/contexts 200 161 ms - 98 
[HTTP] --> POST /wd/hub/session/fa4f13cc-80b2-4db1-b417-cd13798ee4af/context {"name":"WEBVIEW_S"}
[debug] [MJSONWP] Calling AppiumDriver.setContext() with args: ["WEBVIEW_S","fa4f13cc-80b2-4db1-b417-cd13798ee4af"]
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","cat","/proc/net/unix"]
[debug] [AndroidDriver] WEBVIEW_9844 mapped to pid 9844
[debug] [AndroidDriver] Getting process name for webview
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[debug] [AndroidDriver] Parsed pid: '9844' pkg: 'S' from
[debug] [AndroidDriver]     USER      PID   PPID  VSIZE  RSS   WCHAN            PC  NAME
[debug] [AndroidDriver]     u0_a82    9844  1373  1518292 98828 binder_thr 00000000 S com.sparkletech.app
[debug] [AndroidDriver] Returning process name: 'S'
[debug] [AndroidDriver] Found webviews: ["WEBVIEW_S"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_S"]
[debug] [AndroidDriver] Connecting to chrome-backed webview context 'WEBVIEW_S'
[debug] [AndroidDriver] A port was not given, using random port: 8000
[debug] [Chromedriver] Changed state to 'starting'
[Chromedriver] Set chromedriver binary as: /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver
[debug] [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver.*--port=8000"
[Chromedriver] No old chromedrivers seemed to exist
[debug] [Chromedriver] Cleaning any old adb forwarded port socket connections
[debug] [ADB] List forwarding ports
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","forward","--list"]
[debug] [ADB] Removing forwarded port socket connection: 12264 
[debug] [ADB] Running '/Users/lokesh/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","emulator-5554","forward","--remove","tcp:12264"]
[Chromedriver] Spawning chromedriver with: /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Mac OS X\",\"version\":\"10.13.4\"}}}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.sparkletech.app","androidUseRunningApp":true,"androidDeviceSerial":"emulator-5554"}}}
[debug] [Chromedriver] Webview version: 'Chrome/51.0.2704.90'
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"7e665c4f7cb6a80ad2d9589e51504765","status":33,"value":{"message":"session not created exception: Chrome version must be >= 65.0.3325.0\n  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)"}}
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.sparkletech.app","androidUseRunningApp":true,"androidDeviceSerial":"emulator-5554"}}}
[debug] [Chromedriver] Webview version: 'Chrome/51.0.2704.90'
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"5393e82cdbef8206a130d6f1e3fac315","status":33,"value":{"message":"session not created exception: Chrome version must be >= 65.0.3325.0\n  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)"}}
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.sparkletech.app","androidUseRunningApp":true,"androidDeviceSerial":"emulator-5554"}}}
[debug] [Chromedriver] Webview version: 'Chrome/51.0.2704.90'
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"57883c05b8d4fe0b9ff9bb3c5121b4ee","status":33,"value":{"message":"session not created exception: Chrome version must be >= 65.0.3325.0\n  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)"}}
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.sparkletech.app","androidUseRunningApp":true,"androidDeviceSerial":"emulator-5554"}}}
[debug] [Chromedriver] Webview version: 'Chrome/51.0.2704.90'
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"28397955268db8b06d4a2dc3055ed85a","status":33,"value":{"message":"session not created exception: Chrome version must be >= 65.0.3325.0\n  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)"}}
[Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver] Changed state to 'stopped'
[Chromedriver] Unable to automate Chrome version because it is too old for this version of Chromedriver.
[Chromedriver] Please see 'https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/chromedriver.md'
[Chromedriver] Error: session not created exception: Chrome version must be >= 65.0.3325.0
  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)
    at Chromedriver.callee$2$0$ (../../lib/chromedriver.js:163:26)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
 Error: session not created exception: Chrome version must be >= 65.0.3325.0
  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)
    at Chromedriver.callee$2$0$ (../../lib/chromedriver.js:163:26)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] Encountered internal error running command: Error: session not created exception: Chrome version must be >= 65.0.3325.0
  (Driver info: chromedriver=2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=Mac OS X 10.13.4 x86_64)
    at Chromedriver.callee$2$0$ (../../lib/chromedriver.js:163:26)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session/fa4f13cc-80b2-4db1-b417-cd13798ee4af/context 500 2885 ms - 358 

【问题讨论】:

    标签: android automation selenium-chromedriver appium


    【解决方案1】:

    以下是 Chrome 驱动程序版本列表及其对应的可自动化的最低 Chrome 版本:

    https://appium.io/docs/en/writing-running-appium/web/chromedriver/

    您需要将 Chrome 升级到最新版本:

    Chrome 版本必须 >= 65.0.3325.0

    驱动程序信息:chromedriver=2.38.552518,如日志中所述。

    如果您特别需要 Chrome 版本“53.0.2785”,则应安装与相应版本兼容的 ChromeDriver 2.26 https://chromedriver.storage.googleapis.com/index.html?path=2.26/

    参考:

    https://appium.io/docs/en/writing-running-appium/web/chromedriver/

    How to upgrade chromedriver version for appium?

    【讨论】:

    • 感谢您的评论,如果我将我的 chromedriver 设置为 => 2.38 65.0.3325.0,那么我会收到一条错误消息 ---> 原始错误:没有找到可以自动化 Chrome '58.0.3029' 的 Chromedriver现在,所以现在它要求设置不同的版本。
    【解决方案2】:

    https://appium.io/docs/en/writing-running-appium/web/chromedriver/

    从上述位置下载预期版本的 exe 并在下方设置所需的 AndroidDriver 功能。

    DesiredCapabilities desiredCapabilities = new DesiredCapabilities();  
    
    desiredCapabilities.setCapability("chromedriverExecutable","D:\\Automation_Project\\MobileAutomationBestPractices\\drivers\\chromedriver.exe");
    

    【讨论】:

    • 谢谢@Arpan Saini
    【解决方案3】:

    可以让Appium自动下载chromedriver版本:

    "appium --allow-insecure chromedriver_autodownload" 在您运行 appium 服务器的 CMD 中运行它。一旦我们运行上面的命令,appium 就会得到与模拟器/设备匹配的兼容浏览器版本,现在从下一次开始正常启动 appium 服务器并运行代码。

    上述命令在 Appium v​​1.21.0 中测试

    观看此视频 -how to update appium chrome driver

    【讨论】:

      【解决方案4】:

      您需要根据此处https://appium.io/docs/en/writing-running-appium/web/chromedriver/ 的版本更新/降级appium 的chromedriver.exe 文件

      在以下路径"C:\Users\[UserName]\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\"中可用

      只需删除之前的chromedriver.exe,下载并粘贴相应的版本即可。

      【讨论】:

        猜你喜欢
        • 2018-12-11
        • 1970-01-01
        • 1970-01-01
        • 2020-05-16
        • 1970-01-01
        • 1970-01-01
        • 2023-03-20
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多