我正在尝试使用硒和Internet Explorer 11运行自动化的Junit测试,但是由于某些原因,我无法启动IE。
我已经将范围缩小了一些。如果我手动启动IEDriverServer.exe并用邮递员发送命令,我将得到以下结果。
C:\home\trim\iedriver>IEDriverServer.exe /log-level=DEBUG
I 2019-03-01 17:34:07:435 server.cc(86) Starting WebDriver server on port: '5555' on host: ''
I 2019-03-01 17:34:07:435 IEServer.cpp(33) Driver version: 3.9.0.0 (64-bit)
D 2019-03-01 17:34:07:435 server.cc(148) Civetweb ACL is -0.0.0.0/0,+127.0.0.1
Started InternetExplorerDriver server (64-bit)
3.9.0.0
Listening on port 5555
Log level is set to DEBUG
Only local connections are allowed
D 2019-03-01 17:34:13:657 server.cc(281) Command: GET /status {}
D 2019-03-01 17:34:13:659 server.cc(338) Response: {"value":{"build":{"version":"3.9.0.0 (64-bit)"},"message":"Ready to create session","os":{"arch":"x64","name":"windows","version":"10.0.17134.590 (WinBuild.160101.0800)"},"ready":true}}
D 2019-03-01 17:38:49:311 server.cc(281) Command: POST /session {}
D 2019-03-01 17:38:49:311 IESession.cpp(53) Mutex acquired for session initalization
D 2019-03-01 17:38:49:315 IESession.cpp(109) Releasing session initialization mutex
D 2019-03-01 17:38:49:315 command.cc(36) Raw JSON command: { "name" : "newSession", "locator" : { }, "parameters" : {} }
W 2019-03-01 17:38:49:315 IECommandExecutor.cpp(645) Unable to get current browser
C:\home\trim\iedriver>
状态成功,但是创建会话因未获得浏览器而失败。
IEDriverServer.exe 3.9.0.0(64位),并且我正在运行Windows 10。