我正在尝试评估 Selenium-Jupiter,但会遇到不同的问题,行为取决于我使用的版本。
我正在使用 gradle 4.6 和
> docker version | grep API
API version: 1.24
API version: 1.24
使用时io.github.bonigarcia:selenium-jupiter:2.1.0
gradle clean test --info
...
Caused by:
io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: com.spotify.docker.client.exceptions.ContainerNotFoundException: Container not found: c222d04fa9726606939b34d27565345d5462dbc9e6744e438a662099325c573a
Caused by:
io.github.bonigarcia.SeleniumJupiterException: com.spotify.docker.client.exceptions.ContainerNotFoundException: Container not found: c222d04fa9726606939b34d27565345d5462dbc9e6744e438a662099325c573a
Caused by:
com.spotify.docker.client.exceptions.ContainerNotFoundException: Container not found: c222d04fa9726606939b34d27565345d5462dbc9e6744e438a662099325c573a
Caused by:
com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST unix://localhost:80/containers/c222d04fa9726606939b34d27565345d5462dbc9e6744e438a662099325c573a/start: 404, body: {"message":"invalid header field value \"oci runtime error: container_linux.go:247: starting container process caused \\\"exec: \\\\\\\"\\\\\\\": executable file not found in $PATH\\\"\\n\""}
Caused by:
javax.ws.rs.NotFoundException: HTTP 404 Not Found
使用时io.github.bonigarcia:selenium-jupiter:2.0.0
gradle clean test --info
...
Caused by:
io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: org.openqa.selenium.WebDriverException: create container: Error response from daemon: client is newer than server (client API version: 1.30, server API version: 1.24) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 31 milliseconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'xxxx', ip: '10.167.6.18', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.21.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: RemoteWebDriver
Caused by:
io.github.bonigarcia.SeleniumJupiterException: org.openqa.selenium.WebDriverException: create container: Error response from daemon: client is newer than server (client API version: 1.30, server API version: 1.24) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 31 milliseconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'xxxx', ip: '10.167.6.18', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.21.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: RemoteWebDriver
Caused by:
org.openqa.selenium.WebDriverException: create container: Error response from daemon: client is newer than server (**client API version: 1.30, server API version: 1.24**) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 31 milliseconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'xxxx', ip: '10.167.6.18', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.21.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: RemoteWebDriver
我假设 Selenium-Jupiter 和 Selenoid 之间的交互需要一些配置,就像DOCKER_API_VERSION
这里描述的那样http://aerokube.com/selenoid/latest/#_recommended_docker_settings但我不知道从 Selenium-Jupiter 到哪里做这个配置事情的一面。
我意识到这是一个相当模糊的呼救声,但希望有人至少能给我一些关于如何解决这个问题的提示。我真的很喜欢使用 Docker 进行这种虚拟化的想法,我认为我们的 GUI 测试确实可以从这样的解决方案中受益。