<tfoot id='ih2Hy'></tfoot>

        <i id='ih2Hy'><tr id='ih2Hy'><dt id='ih2Hy'><q id='ih2Hy'><span id='ih2Hy'><b id='ih2Hy'><form id='ih2Hy'><ins id='ih2Hy'></ins><ul id='ih2Hy'></ul><sub id='ih2Hy'></sub></form><legend id='ih2Hy'></legend><bdo id='ih2Hy'><pre id='ih2Hy'><center id='ih2Hy'></center></pre></bdo></b><th id='ih2Hy'></th></span></q></dt></tr></i><div id='ih2Hy'><tfoot id='ih2Hy'></tfoot><dl id='ih2Hy'><fieldset id='ih2Hy'></fieldset></dl></div>
        • <bdo id='ih2Hy'></bdo><ul id='ih2Hy'></ul>

      1. <legend id='ih2Hy'><style id='ih2Hy'><dir id='ih2Hy'><q id='ih2Hy'></q></dir></style></legend>

        <small id='ih2Hy'></small><noframes id='ih2Hy'>

        WebDriverException:未知错误:对于旧版本的 Google Chrome,在 Python 中找不到带有

        WebDriverException: unknown error: cannot find Chrome binary error with Selenium in Python for older versions of Google Chrome(WebDriverException:未知错误:对于旧版本的 Google Chrome,在 Python 中找不到带有 Selenium 的 Chrome 二进制错误) - I
      2. <tfoot id='S9xSe'></tfoot>

            <bdo id='S9xSe'></bdo><ul id='S9xSe'></ul>
            • <small id='S9xSe'></small><noframes id='S9xSe'>

            • <legend id='S9xSe'><style id='S9xSe'><dir id='S9xSe'><q id='S9xSe'></q></dir></style></legend>

                  <tbody id='S9xSe'></tbody>
                • <i id='S9xSe'><tr id='S9xSe'><dt id='S9xSe'><q id='S9xSe'><span id='S9xSe'><b id='S9xSe'><form id='S9xSe'><ins id='S9xSe'></ins><ul id='S9xSe'></ul><sub id='S9xSe'></sub></form><legend id='S9xSe'></legend><bdo id='S9xSe'><pre id='S9xSe'><center id='S9xSe'></center></pre></bdo></b><th id='S9xSe'></th></span></q></dt></tr></i><div id='S9xSe'><tfoot id='S9xSe'></tfoot><dl id='S9xSe'><fieldset id='S9xSe'></fieldset></dl></div>

                • 本文介绍了WebDriverException:未知错误:对于旧版本的 Google Chrome,在 Python 中找不到带有 Selenium 的 Chrome 二进制错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  出于兼容性原因,我更喜欢将 Chrome 版本 55.0.2883.75 与 Chromedriver v. 2.26 一起使用.我从

                  1 对于 Linux 系统,ChromeDriver 期望 /usr/bin/google-chrome符号链接 到实际的 Chrome 二进制文件.

                  <小时>

                  在非标准位置使用 Chrome 可执行文件

                  但是您也可以覆盖默认的 Chrome 二进制位置,如下所示:

                  <小时>

                  要使用通过 ChromeDriver v2.26 安装在非标准位置的 Chrome 版本 55.x,您可以使用以下代码块:

                  从 selenium 导入 webdriver从 selenium.webdriver.chrome.options 导入选项选项=选项()options.binary_location = "C:\Program Files\Chrome\chrome64_55.0.2883.75\chrome.exe"driver = webdriver.Chrome(chrome_options = options, executable_path=r'C:path	ochromedriver.exe')driver.get('http://google.com/')print("Chrome 浏览器调用")driver.quit()

                  <小时>

                  参考

                  您可以在以下位置找到详细讨论:

                  • 是否需要安装 Chrome 或使用 Selenium 时只能使用 chromedriver?

                  For compatibility reasons I prefer to use Chrome version 55.0.2883.75 with Chromedriver v. 2.26. I downloaded the older version of chrome from https://www.slimjet.com/chrome/google-chrome-old-version.php and Chromedriver 2.26 from https://chromedriver.storage.googleapis.com/index.html?path=2.26/.

                  I am using the following code to attempt to set my Chrome binary location:

                  from selenium import webdriver
                  from selenium.webdriver.chrome.options import Options
                  
                  options = Options()
                  options.binary_location = "C:\Program Files\Chrome\chrome64_55.0.2883.75\chrome.exe"
                  driver = webdriver.Chrome('chromedriver.exe', chrome_options = options)
                  

                  However, when I attempt to launch the WebDriver Python returns the following error:

                  WebDriverException: unknown error: cannot find Chrome binary
                  (Driver info: chromedriver=2.26.436362
                  (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.14393 x86_64)
                  

                  I have tried searching through similar questions and answers but have not had any luck so far. Any help is greatly appreciated - thank you in advance!

                  解决方案

                  This error message...

                  WebDriverException: unknown error: cannot find Chrome binary
                  

                  ...implies that the ChromeDriver was unable to find the Chrome binary in the default location for your system.

                  As per the ChromeDriver - Requirements:

                  The ChromeDriver server expects you to have Chrome installed in the default location for each system as follows:

                  1 For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.


                  Using a Chrome executable in a non-standard location

                  However you can also override the default Chrome binary location as follows:


                  To use Chrome version 55.x installed in non standard location through ChromeDriver v2.26 you can use the following code block :

                  from selenium import webdriver
                  from selenium.webdriver.chrome.options import Options
                  
                  options = Options()
                  options.binary_location = "C:\Program Files\Chrome\chrome64_55.0.2883.75\chrome.exe"
                  driver = webdriver.Chrome(chrome_options = options, executable_path=r'C:path	ochromedriver.exe')
                  driver.get('http://google.com/')
                  print("Chrome Browser Invoked")
                  driver.quit()
                  


                  Reference

                  You can find a detailed discussion in:

                  • Is Chrome installation needed or only chromedriver when using Selenium?

                  这篇关于WebDriverException:未知错误:对于旧版本的 Google Chrome,在 Python 中找不到带有 Selenium 的 Chrome 二进制错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                • <legend id='uNDhp'><style id='uNDhp'><dir id='uNDhp'><q id='uNDhp'></q></dir></style></legend>
                    <tbody id='uNDhp'></tbody>
                  <i id='uNDhp'><tr id='uNDhp'><dt id='uNDhp'><q id='uNDhp'><span id='uNDhp'><b id='uNDhp'><form id='uNDhp'><ins id='uNDhp'></ins><ul id='uNDhp'></ul><sub id='uNDhp'></sub></form><legend id='uNDhp'></legend><bdo id='uNDhp'><pre id='uNDhp'><center id='uNDhp'></center></pre></bdo></b><th id='uNDhp'></th></span></q></dt></tr></i><div id='uNDhp'><tfoot id='uNDhp'></tfoot><dl id='uNDhp'><fieldset id='uNDhp'></fieldset></dl></div>

                  • <tfoot id='uNDhp'></tfoot>

                          <bdo id='uNDhp'></bdo><ul id='uNDhp'></ul>

                        • <small id='uNDhp'></small><noframes id='uNDhp'>