I have an issue when trying a simple test with selenium avec chromedriver. I get the error org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
This has been reported a couple of time on stackoveflow, i've read near all the answers without success at this time. I'm using a corporate managed computer without admin rights, using chrome 86.0.4240 with same version of chromedriver, selenium-standalone-server 3.9.1.
The code used is below, with the trace of different tries according to different stackoverflow topics found.
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver","C:\\Users\\" + System.getProperty("user.name") + "\\Downloads\\chromedriver_win32\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
Proxy proxy = new Proxy();
proxy.setHttpProxy("127.0.0.1:9000");
options.setCapability("proxy", proxy);
// Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
// https://stackoverflow.com/questions/50642308/webdriverexception-unknown-error-devtoolsactiveport-file-doesnt-exist-while-t/51326137#51326137
options.addArguments("--disable-dev-shm-usage"); // overcome limited resource problems
options.addArguments("start-maximized"); // open Browser in maximized mode
options.addArguments("disable-infobars"); // disabling infobars
options.addArguments("--disable-extensions"); // disabling extensions
options.addArguments("--disable-gpu"); // applicable to windows os only
options.addArguments("--no-sandbox"); // Bypass OS security model
// All chrome process are previously killed : Get-Process -Name chrome* | Stop-Process
// https://stackoverflow.com/questions/59987080/invalidargumentexception-message-invalid-argument-user-data-directory-is-alre
//options.addArguments("--user-data-dir=C:\\Users\\" + System.getProperty("user.name") + "\\AppData\\Local\\Google\\Chrome\\Automation\\");
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com"); }
When i run the test, Chrome Open, display the message tell it's controlled by an automated tool, display "data:" in the URL bar and hang. After a couple of seconds (minutes), the script ends with the above error.
I'm runing on a plain windows 10 plateform, with no docker. I cannot create a new chrome profile, so i take care to close all chrome process before starting the test.
Any help will be greatly appreciated.