<legend id='jQxYk'><style id='jQxYk'><dir id='jQxYk'><q id='jQxYk'></q></dir></style></legend>

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

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

      <tfoot id='jQxYk'></tfoot>

        错误消息:“chromedriver"可执行文件需要是 PATH

        Error Message: #39;chromedriver#39; executable needs to be PATH(错误消息:“chromedriver可执行文件需要是 PATH)

        <small id='6eG20'></small><noframes id='6eG20'>

            <tbody id='6eG20'></tbody>

            • <tfoot id='6eG20'></tfoot>
                <bdo id='6eG20'></bdo><ul id='6eG20'></ul>
                <i id='6eG20'><tr id='6eG20'><dt id='6eG20'><q id='6eG20'><span id='6eG20'><b id='6eG20'><form id='6eG20'><ins id='6eG20'></ins><ul id='6eG20'></ul><sub id='6eG20'></sub></form><legend id='6eG20'></legend><bdo id='6eG20'><pre id='6eG20'><center id='6eG20'></center></pre></bdo></b><th id='6eG20'></th></span></q></dt></tr></i><div id='6eG20'><tfoot id='6eG20'></tfoot><dl id='6eG20'><fieldset id='6eG20'></fieldset></dl></div>
              • <legend id='6eG20'><style id='6eG20'><dir id='6eG20'><q id='6eG20'></q></dir></style></legend>
                  本文介绍了错误消息:“chromedriver"可执行文件需要是 PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我刚开始使用 Selenium 并且能够加载 google,但现在当我运行以下代码时会产生错误:

                  I just started on Selenium and was able to load up google but now when I run the following code it produces the error:

                  selenium.common.exceptions.WebDriverException: Message 'chromedriver' executable needs
                  to be PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
                  

                  为什么说C:Users/Colin/Python/chromedriver"不是路径?

                  Why is it saying "C:Users/Colin/Python/chromedriver" is not a path?

                  from selenium import webdriver
                  
                  browser = webdriver.Chrome("C:Users/Colin/Python/chromedriver")
                  browser.get('http://www.google.com')
                  
                  browser.quit()
                  

                  推荐答案

                  使用 Selenium v3.xChromeDriverChrome 浏览器您可能需要通过以下任一选项将参数 executable_pathChromeDriver 二进制文件的 绝对路径 一起传递:

                  While working with Selenium v3.x, ChromeDriver and Chrome Browser you may need to pass the argument executable_path along with the absolute path of the ChromeDriver binary through either of the following options:

                  • 双反斜杠,即 (\)
                  • 单反斜杠,即 () 以及原始 (r) 开关.
                  • 二进制扩展名,即(.exe)
                  • Double back slashes i.e. (\)
                  • Single back slash i.e () along with the raw (r) switch.
                  • Binary extension i.e. (.exe)

                  所以你必须换行:

                  browser = webdriver.Chrome("C:Users/Colin/Python/chromedriver")
                  

                  与:

                  browser = webdriver.Chrome(executable_path=r'C:UsersColinPythonchromedriver.exe')
                  

                  这篇关于错误消息:“chromedriver"可执行文件需要是 PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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中更改按钮或标签文本颜色)

                  • <bdo id='y8CpE'></bdo><ul id='y8CpE'></ul>

                    <legend id='y8CpE'><style id='y8CpE'><dir id='y8CpE'><q id='y8CpE'></q></dir></style></legend>

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

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