c# - 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));
运行程序。我的结果页面仍然是“数据:”。没有转到我想要的页面。不幸的是,不同的扩展都尝试了相同的方法。
解决方案
推荐阅读
- python - 如何格式化数字以截断值
- docker - Dockerfile:无法运行 bin 命令 ubuntu
- ionic-framework - 想要从 firestore 获取数据到我的 ionic 4 应用程序
- ruby-on-rails - Rails 在满足条件的地方加入多态模型属性
- identityserver4 - 带有 Azure AD 令牌验证的客户端凭据
- elasticsearch - Elasticsearch - 在索引模板文件中使用 is_write 参数创建别名
- sorting - 从 Java Comparator 转换后的 Kotlin Comparator
- javascript - 如何将 flexbox 应用于 CSS 切换开关元素?
- regex - 在管道分隔值中查找某个单词
- mysql - mysql 测试 IF 变量是否为空(或为空)