Я пытаюсь запустить веб-драйвер в сценарии Python, и когда сценарий пытается запустить google chrome, он завершается с кодом состояния 11.
Вот сценарий python:
#!/usr/bin/python3
import time
from selenium import webdriver
driver = webdriver.Chrome('/usr/bin/google-chrome') # Optional argument, if not specified will search path.
driver.get('http://www.google.com/');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
driver.quit()
Вот полный вывод:
[ec2-user@ip-xxx-xx-xx-xxx pythonscrape]$ python3 test-selenium-chrome.py
Traceback (most recent call last):
File "test-selenium-chrome.py", line 5, in <module>
driver = webdriver.Chrome('/usr/bin/google-chrome') # Optional argument, if not specified will search path.
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/google-chrome unexpectedly exited. Status code was: -11
Кто-нибудь знает, почему мой скрипт сообщает об ошибке 11 при попытке запустить Google chrome?