Python Windows边缘webdriver因WebDriverException失败:消息:未知错误
我试图在CircleCI中的Windows Edge上运行Python Windows边缘webdriver因WebDriverException失败:消息:未知错误,python,selenium,microsoft-edge,circleci,python-behave,Python,Selenium,Microsoft Edge,Circleci,Python Behave,我试图在CircleCI中的Windows Edge上运行behave测试,但即使是简单的测试也无法初始化具有 Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\edge\webdriver.py
behave
测试,但即使是简单的测试也无法初始化具有
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\edge\webdriver.py", line 66, in __init__
desired_capabilities=capabilities)
File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\remote\errorhandler.py", line 208, in check_response
raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: Unknown error
然后我ssh到机器上进行调试并尝试
python -c "from selenium import webdriver; webdriver.Edge()"
这将导致上述错误。web驱动程序的路径正确,不正确的路径将导致另一个错误
已经试过了
/c/tools/selenium/MicrosoftWebDriver.exe
[14:48:13.545] - Listening on http://localhost:17556/
这会导致401错误错误请求,或者如果我更新了所需的\u功能
类似于:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found
目前,无法在CircleCI映像上安装Edge。但如果像BrowserStack这样的服务不适合您,那么有一种方法可以在您自己的/AWS机器上使用Windows/Edge运行Selenium,并部署一个官方的流浪者映像
webdriver.Remote
您可以连接到安装了Edge和web驱动程序的Selenium(集线器或单机版)目前,无法在CircleCI映像上安装Edge。但如果像BrowserStack这样的服务不适合您,那么有一种方法可以在您自己的/AWS机器上使用Windows/Edge运行Selenium,并部署一个官方的流浪者映像
webdriver.Remote
您可以连接到安装了Edge和web驱动程序的Selenium(集线器或单机版)您是否尝试停止并重新启动服务?您的Microsoft Edge版本和Microsoft Edge WebDriver版本是什么?在上,它表示要在Windows计算机上运行作业,必须将
Windows
键添加到作业的顶级配置中。此外,请注意,通过SSH连接到Windows作业并使用bash
shell会导致空的终端提示。您是否尝试停止并重新启动服务?您的Microsoft Edge版本和Microsoft Edge WebDriver版本是什么?在上,它表示要在Windows计算机上运行作业,必须将Windows
键添加到作业的顶级配置中。此外,请注意,通过SSH连接到Windows作业并使用bash
shell会导致一个空的终端提示。
/c/tools/selenium/MicrosoftWebDriver.exe
[14:48:13.545] - Listening on http://localhost:17556/
python -c "from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver; from selenium.webdriver.common.desired_capabilities import DesiredCapabilities; from selenium.webdriver.chrome.remote_connection import ChromeRemoteConnection; rwd = RemoteWebDriver(command_executor=ChromeRemoteConnection(remote_server_addr='http://localhost:17556', keep_alive=False))"
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found