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

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

问题描述

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

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).

我的问题:我们无法首先使用 Chromedriver 2.28,因为 sutomation 扩展必须在我们的组织中列入白名单.我们做了白名单,并且能够运行 Chromedriver 2.31.当我尝试使用 Chromedriver 2.32 时,我遇到了同样的加载未打包的扩展程序被禁用"弹出窗口错误.

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.

推荐答案

事实上 Chrome 浏览器Automation Extension 问题在 ChromeDriver 之前出现了几个构建v2.32

Factually the Automation Extension issue with Chrome Browser surfaced a couple of builds earlier then ChromeDriver v2.32

从最后两个讨论 Chrome Browser-org.openqa.selenium.WebDriverException:未知错误:无法获取自动化扩展Error:cannot getautomation extension for chrome with selenium 很明显 Automation Extension 完全是由于 Chrome DriverChrome Browser 之间的兼容性不匹配造成的.

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 .

根据 Chrome 驱动程序 2.28 和 Chrome 驱动程序 2.32 的发行说明,有一些尝试弥合几乎所有操作系统变体的差距,如下所示:

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 驱动程序 2.28:已解决的问题1625:错误:无法在 Chrome57+ 上获取自动化扩展 [['OS-All', 'Pri-1', 'merge-merged-2987']]
  • Chrome 驱动程序 2.32:已解决的问题1900: LaunchApp 命令抛出 UnknownError: cannot get automation extension on Mac and Windows Chrome v62+ [['Pri-2']]

然而,在尝试使用 driver.manage().window().maximize(); 最大化 Chrome 时,也有一些关于 Automation Extension 相关错误的报告浏览器.最大化 Chrome 浏览器的理想方法是使用 ChromeOptions.addArguments("start-maximized"); 代替.

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.

根据您的评论,我不确定在什么情况下您必须将 chrome 扩展安装 列入白名单.但一般来说,如果使用兼容版本的 ChromeDriverChrome 浏览器 二进制版本并正确使用 ChromeOptions 类,您应该不会遇到任何此类错误.

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.

您可以在 Selenium for ChromeDriver 2.35

You can find a detailed discussion of about compatible Chrome Driver and Chrome Browser versions in Selenium for ChromeDriver 2.35

我已经向您指出了您需要使用 ChromeOptions 进行最大化改变窗口大小改变的讨论窗口位置

I have already pointed you to the discussions where you need to use the ChromeOptions for maximizing, changing window size and changing window position

您所指的 Chromium Bug 也是如此可以看到 Chromium Dev Team 并没有打算解决这个问题,并且标有 Status: WontFix

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

除了这些功能之外,如果您仍然需要 Chrome 自动化扩展程序,那么您肯定必须将 Chrome 自动化扩展程序列入白名单.

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天全站免登陆