我知道在无头模式下运行时效果很好。 但是,可以在非无头模式下运行吗?
我已经通过docker安装并设置了xvfb
ENV DISPLAY=:99
运行测试时
docker run -e Xvfb ${DISPLAY} gradle <task name>
它总是给出错误为
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: '4c3a51d1d7', ip: '<ip>', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.87-linuxkit-aufs', java.version: '1.8.0_222'