我在AWS EC2,ubuntu上进行了TDD测试。但是,我有错误的硒的webdriver。我做了监控,打开EC2服务器,但selenium没有联系服务器。 (通常在本地连接)所以我在服务器上执行'python3'。
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
>>> from selenium import webdriver
>>> browser = webdriver.Chrome()
Traceback (most recent call last) :
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python3.5/site-
packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
desired_capabilities=desired_capabilities)
File "/home/ubuntu/.local/lib/python3.5/site-
packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/home/ubuntu/.local/lib/python3.5/site-
packages/selenium/webdriver/remote/webdriver.py", line 188, in
start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/ubuntu/.local/lib/python3.5/site-
packages/selenium/webdriver/remote/webdriver.py", line 252, in execute
self.error_handler.check_response(response)
File "/home/ubuntu/.local/lib/python3.5/site-
packages/selenium/webdriver/remote/errorhandler.py", line 194, in
check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error:
Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.26.436382
(70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-1013-
aws x86_64)
以上代码就是结果。 帮帮我...