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

      1. <small id='PUO5p'></small><noframes id='PUO5p'>

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

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

        让 Chrome 通过 Selenium 启动

        时间:2023-07-05
        <i id='Ej5BZ'><tr id='Ej5BZ'><dt id='Ej5BZ'><q id='Ej5BZ'><span id='Ej5BZ'><b id='Ej5BZ'><form id='Ej5BZ'><ins id='Ej5BZ'></ins><ul id='Ej5BZ'></ul><sub id='Ej5BZ'></sub></form><legend id='Ej5BZ'></legend><bdo id='Ej5BZ'><pre id='Ej5BZ'><center id='Ej5BZ'></center></pre></bdo></b><th id='Ej5BZ'></th></span></q></dt></tr></i><div id='Ej5BZ'><tfoot id='Ej5BZ'></tfoot><dl id='Ej5BZ'><fieldset id='Ej5BZ'></fieldset></dl></div>
            <tfoot id='Ej5BZ'></tfoot>

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

                  <tbody id='Ej5BZ'></tbody>
                <legend id='Ej5BZ'><style id='Ej5BZ'><dir id='Ej5BZ'><q id='Ej5BZ'></q></dir></style></legend>
                • <bdo id='Ej5BZ'></bdo><ul id='Ej5BZ'></ul>
                • 本文介绍了让 Chrome 通过 Selenium 启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在从 python 中的 selenium 获取 Chrome 浏览器实例时遇到问题.我使用的是 Windows 8.我已经下载了 chromedriver 二进制文件并将其添加到我的路径中,但在 Python 中出现以下错误:

                  I am having issues getting an instance of a Chrome browser from selenium in python. I'm using Windows 8. I have downloaded the chromedriver binary and added it to my path but I get the following error in Python:

                  selenium.common.exceptions.WebDriverException: Message: 'ChromeDriver executable needs to be available in the path.   
                  

                  以下行出现此错误:

                  driver = webdriver.Chrome(executable_path='path	ochromedriver_win32_2.0')  
                  

                  推荐答案

                  两种设置方式,你搞混了.

                  Two ways to set it, you somehow mixed up.

                  • chromedriver.exe 的路径放入 PATH(在 Windows 上),这样您的 PATH 设置是正确的,但是你需要调用默认构造函数.

                  • Put the chromedriver.exe's path into PATH (on Windows), so your PATH setting is correct, but you need to call the default constructor.

                  driver = webdriver.Chrome()

                  webdriver.Chrome(executable_path='some path') 中指定路径.这里需要的是可执行文件的完整路径,而不是目录.

                  Specify the path in webdriver.Chrome(executable_path='some path'). Here you need the full path to the executable, not the directory.

                  webdriver.Chrome(executable_path=r'C:UsersHaranKumarDownloadschromedriver_win32_2.0chromedriver.exe')

                  选择你想要的任何一个.

                  Choose either one you want.

                  这篇关于让 Chrome 通过 Selenium 启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Selenium 意外出现问题 下一篇:Mac 上 Python 中的 Selenium - Geckodriver 可执行文件需要在 PATH 中

                  相关文章

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

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

                  1. <tfoot id='SPgSj'></tfoot>