[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)