Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

google chrome - What has changed on Chromedriver 2.32 regarding loading of the automation extension?

Chromedriver 2.32 change log states that "Changes to the way automation extension is loaded on Mac and Windows"(https://sites.google.com/a/chromium.org/chromedriver/downloads).

My problem : We were not able to use Chromedriver 2.28 first, because the sutomation extension had to be white-listed in our organisation. We did the white-listing, and we were able to run Chromedriver 2.31. When I tried to use Chromedriver 2.32, I'm getting that same 'Loading of unpacked extensions is disabled' popup window error.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...