I'd like to know if the method shared here: Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection it's still currently working and if yes I'd like to know how to do the same using Java on geckodriver.
Since now I tried the following without success:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("dom.webdriver.enabled","False");
profile.setPreference("useAutomationExtension","False");
FirefoxOptions options = new FirefoxOptions();
options.setProfile(profile);
String user = System.getProperty("user.name");
System.setProperty("webdriver.gecko.driver", "/Users/" + user + "/Desktop/Configs/geckodriver");
FirefoxDriver driver = new FirefoxDriver(options);
driver.executeScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})");
driver.get("https://mysite/");
But typing navigator.webdriver
in console still returns True