Selenium webdriver exception - Chrome failed to start: exited abnormally on centos 7 on google compute engine [duplicate]

别说谁变了你拦得住时间么 提交于 2020-03-05 04:33:08

问题


I am trying to run a selenium headless test on google compute engine with centos 7. I have installed chrome browser 71 using rpm file and the location is /usr/bin/google-chrome. Tried running test with Chromedriver 35,45 but no success. `

System.setProperty("webdriver.chrome.driver","lib/chromedriver");
 ChromeOptions options = new ChromeOptions();
 options.addArguments("headless");
 options.addArguments("window-size=1366,768");  //window size hardcoded set to desktop
 driver = new ChromeDriver(options);
 driver.manage().window().maximize();
 driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
 Following exception observed: 
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.)`

来源:https://stackoverflow.com/questions/60274116/selenium-webdriver-exception-chrome-failed-to-start-exited-abnormally-on-cent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!