chromeOptions.addArguments(dimension);
chromeOptions.addArguments("--disable-gpu");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.setBinary("/usr/bin/google-chrome");
System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
Logger.getLogger("org.openqa.selenium.remote").setLevel(Level.OFF);
System.setProperty("webdriver.chrome.logfile", "target/chromedriver.log");
ChromeDriverService service =
new ChromeDriverService.Builder().withWhitelistedIps("").withVerbose(true).build();
driver = new ChromeDriver(service, chromeOptions);
driver.get(domain);
也安裝在服務器上的卷: 的/ dev/shm的是:/ dev/shm的
這個固定我的問題
可以添加您正在使用的代碼。它會給我們所有人更好的底線,以更好地幫助你 –
是你的代碼工作正常,沒有無頭? –
嘗試[**'無頭模式下的Mozilla Firefox **](https://www.youtube.com/watch?v=PPS89xCgNhk&t=528s) – DebanjanB