Factually the Automation Extension issue with Chrome Browser surfaced a couple of builds earlier then ChromeDriver v2.32
From this last two discussion Chrome Browser-org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension and Error:cannot get automation extension for chrome with selenium it was pretty much evident that the issue of Automation Extension is entirely due to compatibility mismatch between Chrome Driver and Chrome Browser .
As per the Release Notes of Chrome Driver 2.28 and Chrome Driver 2.32 there were some attempts to bridge the gap in almost all the OS variants as follows :
- Chrome Driver 2.28 : Resolved issue 1625: Error: cannot get automation extension on Chrome57+ [['OS-All', 'Pri-1', 'merge-merged-2987']]
- Chrome Driver 2.32 : Resolved issue 1900: LaunchApp command throws UnknownError: cannot get automation extension on Mac and Windows Chrome v62+ [['Pri-2']]
However there were also some reports about Automation Extension related error while trying to use driver.manage().window().maximize();
to maximize the Chrome Browser. An ideal way to maximize Chrome Browser will be to use ChromeOptions.addArguments("start-maximized");
instead.
Update A
As per your comments, I am not sure in which circumstances you had to white-list chrome extension installations . But in general if use compatible version of ChromeDriver and Chrome Browser binary versions and properly use the ChromeOptions Class you shouldn't face any such error.
You can find a detailed discussion of about compatible Chrome Driver and Chrome Browser versions in Selenium for ChromeDriver 2.35
Update B
I have already pointed you to the discussions where you need to use the ChromeOptions for maximizing, changing window size and changing window position
The Chromium Bug you are referring says the same and you can see that Chromium Dev Team have no intention to solve this issue and have marked with Status
: WontFix
Apart from these functions if you still need the Chrome Automation extension in play then you have to whitelist Chrome automation extension for sure.
But in that case you have to showcase your distinct Usecase and your code trials so we can construct a working solution for you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…