首页 > 解决方案 > Chrome驱动程序阻止图像扩展冻结页面?

问题描述

随着新的 Selenium.WebDriver.ChromeDriver.74.0.3729.6 更新,问题就出来了。

https://chrome.google.com/webstore/detail/block-image/pehaalcefcjfccdpbckoablngfkfgfgj?hl=tr

我正在尝试使用上面的扩展。

ChromeDriverService chromeDriverService = ChromeDriverService.CreateDefaultService();
chromeDriverService.HideCommandPromptWindow = true;
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddExtensions(@Application.StartupPath.ToString() + @"\block-image.crx");
driver = new ChromeDriver(chromeDriverService, chromeOptions, TimeSpan.FromMinutes(10));

运行程序。我的结果页面仍然是“数据:”。没有转到我想要的页面。不幸的是,不同的扩展都尝试了相同的方法。

标签: c#

解决方案


推荐阅读