通过带有standalone-chrome映像的docker容器运行TestNG脚本,在容器级别,chrome无法在Linux计算机上启动。
功能还包括:--disable-dev-shm-usage",--no-sandbox,--headless.
我尝试更新chrome驱动程序,但仍然无法正常工作。
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 /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
答案 0 :(得分:2)
StackOverflow新手在这里。共享讨论中的Chrome / ChromeDriver版本会有所帮助。无论如何,我们都将其降级到了Chrome 78(+驱动程序),这个问题就消失了。似乎在较晚的版本中引入了此错误“ DevToolsActivePort文件不存在”。
一些陷阱: