<bdo id='9O8nI'></bdo><ul id='9O8nI'></ul>
    <legend id='9O8nI'><style id='9O8nI'><dir id='9O8nI'><q id='9O8nI'></q></dir></style></legend>

  1. <small id='9O8nI'></small><noframes id='9O8nI'>

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

      Selenium 无法在 CentOS 中启动 Chromedriver

      Selenium fails to start Chromedriver in CentOS(Selenium 无法在 CentOS 中启动 Chromedriver)
        <tbody id='5eWHd'></tbody>
        <tfoot id='5eWHd'></tfoot>

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

          • <small id='5eWHd'></small><noframes id='5eWHd'>

            <legend id='5eWHd'><style id='5eWHd'><dir id='5eWHd'><q id='5eWHd'></q></dir></style></legend>
              • <bdo id='5eWHd'></bdo><ul id='5eWHd'></ul>
              • 本文介绍了Selenium 无法在 CentOS 中启动 Chromedriver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我尝试用 Selenium 启动 Chromedriver

                从 selenium 导入 webdriver驱动程序 = webdriver.Chrome()driver.get("http://www.google.com/")打印(驱动程序.标题)

                和下面的错误消息:

                raise exception_class(message, screen, stacktrace)selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome 无法启动:异常退出(驱动信息:chromedriver=2.33.506092,platform=Linux 3.10.0-693.5.2.el7.x86_64 x86_64)

                我正在使用这些:

                [root@jdu4e00u53f7 工作区]# ll/usr/local/bin/chromedriverlrwxrwxrwx 1 root root 17 11 月 14 00:31/usr/local/bin/chromedriver ->/opt/chromedriver

                • CentOS 7.3
                • Python(3.6.2)
                • 硒 (3.7.0)
                • 谷歌浏览器 (62.0.3202.89)
                • chromedriver(2.9)/我改成chromedriver=2.33.506092
                • Xvfb

                ps,我也试过了

                1. driver = webdriver.Chrome('/usr/local/bin/chromedriver'),不行……

                test.py输出

                参考:Selenium 无法启动 Chromedriver

                1. 在我的服务器上在后台启动 Xvfb:Xvfb :0 -ac -screen 0 1024x768x24 &也不起作用

                ref:未知错误:Chrome 失败启动:异常退出(驱动信息:chromedriver=2.9

                解决方案

                从您提到的配置中可以明显看出您使用的是 Selenium v​​3.7.0, Google Chrome 62.0 以及不兼容的 chromedriver v2.9.因此,我们看到了错误 WebDriverException: Message: unknown error: Chrome failed to start: exited异常

                <块引用>

                ChromeDriver v2.33的发行说明明确提到Supports Chrome v60-62

                解决方案:

                chromedriver v2.33="nofollow noreferrer">this link 并执行你的测试用例.

                更新:

                试试下面的代码块:

                从 selenium 导入 webdriverdriver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver')driver.get('https://www.google.co.in')print("页面标题是:%s" %driver.title)driver.quit()

                <块引用>

                从 selenium 导入 webdriverdriver = webdriver.Chrome(executable_path='/opt/chromedriver')driver.get('https://www.google.co.in')print("页面标题是:%s" %driver.title)driver.quit()

                I try to start Chromedriver with Selenium

                from selenium import webdriver
                driver = webdriver.Chrome()
                driver.get("http://www.google.com/")
                print(driver.title)
                

                and error msg below:

                raise exception_class(message, screen, stacktrace)
                selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
                 (Driver info: chromedriver=2.33.506092,platform=Linux 3.10.0-693.5.2.el7.x86_64 x86_64)
                

                I am using these:

                [root@jdu4e00u53f7 workspace]# ll /usr/local/bin/chromedriver
                lrwxrwxrwx 1 root root 17 1114 00:31 /usr/local/bin/chromedriver -> /opt/chromedriver
                

                • CentOS 7.3
                • Python(3.6.2)
                • selenium (3.7.0)
                • Google Chrome (62.0.3202.89)
                • chromedriver(2.9)/ I changed to chromedriver=2.33.506092
                • Xvfb

                ps, I also tried

                1. driver = webdriver.Chrome('/usr/local/bin/chromedriver'),it not work...

                test.py output

                ref :Selenium fails to start Chromedriver

                1. On my server start Xvfb in the background: Xvfb :0 -ac -screen 0 1024x768x24 & and also not work

                ref:unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9

                解决方案

                It is much evident from your mentioned configuration that you are using Selenium v3.7.0, Google Chrome 62.0 along with chromedriver v2.9 which is not compatible. Hence we are seeing the error WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally

                The Release Notes of ChromeDriver v2.33 clearly mentions Supports Chrome v60-62

                Solution:

                Download the latest chromedriver v2.33 from this link and execute your testcase.

                Update :

                Try the following code block :

                from selenium import webdriver
                driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver')
                driver.get('https://www.google.co.in')
                print("Page Title is : %s" %driver.title)
                driver.quit()
                

                OR

                from selenium import webdriver
                driver = webdriver.Chrome(executable_path='/opt/chromedriver')
                driver.get('https://www.google.co.in')
                print("Page Title is : %s" %driver.title)
                driver.quit()
                

                这篇关于Selenium 无法在 CentOS 中启动 Chromedriver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                【网站声明】本站部分内容来源于互联网,旨在帮助大家更快的解决问题,如果有图片或者内容侵犯了您的权益,请联系我们删除处理,感谢您的支持!

                相关文档推荐

                python: Two modules and classes with the same name under different packages(python:不同包下同名的两个模块和类)
                Configuring Python to use additional locations for site-packages(配置 Python 以使用站点包的其他位置)
                How to structure python packages without repeating top level name for import(如何在不重复导入顶级名称的情况下构造python包)
                Install python packages on OpenShift(在 OpenShift 上安装 python 包)
                How to refresh sys.path?(如何刷新 sys.path?)
                Distribute a Python package with a compiled dynamic shared library(分发带有已编译动态共享库的 Python 包)

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

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

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

                          <tbody id='D2Bjg'></tbody>
                        • <bdo id='D2Bjg'></bdo><ul id='D2Bjg'></ul>