Chromedriver 2.32有关加载自动化扩展的变化是什么? [英] What has changed on Chromedriver 2.32 regarding loading of the automation extension?

查看:102
本文介绍了Chromedriver 2.32有关加载自动化扩展的变化是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chromedriver 2.32更改日志指出更改自动化扩展在Mac和Windows上加载的方式( https://sites.google.com/a/chromium.org/chromedriver/downloads )。



我的问题:
我们无法首先使用Chromedriver 2.28,因为sutomation扩展必须在我们的组织中列入白名单。
我们做了白名单,我们能够运行Chromedriver 2.31。
当我试图使用Chromedriver 2.32时,我得到了同样的结果'加载解压后的扩展被禁用'弹出窗口错误。 之前的构建 ChromeDriver v2.32



从最后两个讨论 em> 错误:无法使用硒获得自动化扩展 很明显,自动化扩展的问题完全是由于 Chrome驱动程序与兼容性不匹配所致。和 Chrome浏览器



根据Chrome Driver 2.28和Chrome Driver 2.32的发行说明,重新尝试去填补几乎所有操作系统变种的差距,如下所示:


  • Chrome Driver 2.28 :已解决问题1625:错误:无法在Chrome57 +上获得自动延期[['OS -All','Pri-1','merge-merged-2987']]

  • Chrome驱动2.32 :解决的问题1900:LaunchApp命令抛出UnknownError:无法在Mac和Windows上获得自动扩展Chrome v62 + [['Pri-2 ']]



然而,在尝试使用<$>时,也有一些关于自动扩展 c $ c> driver.manage()。window()。maximize(); 来最大化Chrome浏览器。使Chrome浏览器最大化的理想方法是使用 ChromeOptions.addArguments(start-maximized);



< h2>更新A

根据您的意见,我不确定在哪些情况下您必须将扩展程序安装列入白名单。但一般情况下,如果使用兼容版本的 ChromeDriver Chrome浏览器二进制版本并正确使用 ChromeOptions 类,则不应该面临任何此类错误。

有关兼容的 Chrome驱动程序 Chrome浏览器版本的详细讨论,请参阅 ChromeDriver 2.35的硒






更新B



我已经指出了您需要使用用于最大化更改窗口大小更改窗口位置的ChromeOptions


你所指的 Chromium Bug 说同样的您可以看到 Chromium Dev Team 没有任何内容n来解决这个问题,并用 Status :WontFix

标记。除了这些如果您仍然需要 Chrome自动搜索扩展程序功能,则必须将白名单式Chrome自动扩展程序确定。 << >但在这种情况下,您必须展示您独特的用例代码试用版,以便我们可以为您构建工作解决方案。


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.

解决方案

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.

这篇关于Chromedriver 2.32有关加载自动化扩展的变化是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆