python3.7.4安装chrome_centos7.4 64位安装 google-chrome 与 chromedriver 运行 Python selenium 项目...

[root@iZwz9117d4ssv2v5oe81m3Z selenium_baidu]# python testRun.py

package_util 初始化

testRun.py:32: DeprecationWarning: use options instead of chrome_options

driver= webdriver.Chrome(path, chrome_options=options)

Exceptionin thread Thread-1:

Traceback (most recent calllast):

File"/usr/python/lib/python3.7/threading.py", line 917, in_bootstrap_inner

self.run()

File"/usr/python/lib/python3.7/threading.py", line 865, inrun

self._target(*self._args, **self._kwargs)

File"testRun.py", line 32, inget_url

driver= webdriver.Chrome(path, chrome_options=options)

File"/usr/python/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in__init__

desired_capabilities=desired_capabilities)

File"/usr/python/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in__init__

self.start_session(capabilities, browser_profile)

File"/usr/python/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, instart_session

response=self.execute(Command.NEW_SESSION, parameters)

File"/usr/python/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, inexecute

self.error_handler.check_response(response)

File"/usr/python/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, incheck_response

raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally

(unknown error: DevToolsActivePortfile doesn't exist)

(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

(Driverinfo: chromedriver=70.0.3538.16 (16ed95b41bb05e565b11fb66ac33c660b721f778),platform=Linux 3.10.0-693.2.2.el7.x86_64 x86_64)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值