• <bdo id='T4FYR'></bdo><ul id='T4FYR'></ul>
  • <tfoot id='T4FYR'></tfoot>
  • <legend id='T4FYR'><style id='T4FYR'><dir id='T4FYR'><q id='T4FYR'></q></dir></style></legend>

    <small id='T4FYR'></small><noframes id='T4FYR'>

      <i id='T4FYR'><tr id='T4FYR'><dt id='T4FYR'><q id='T4FYR'><span id='T4FYR'><b id='T4FYR'><form id='T4FYR'><ins id='T4FYR'></ins><ul id='T4FYR'></ul><sub id='T4FYR'></sub></form><legend id='T4FYR'></legend><bdo id='T4FYR'><pre id='T4FYR'><center id='T4FYR'></center></pre></bdo></b><th id='T4FYR'></th></span></q></dt></tr></i><div id='T4FYR'><tfoot id='T4FYR'></tfoot><dl id='T4FYR'><fieldset id='T4FYR'></fieldset></dl></div>

      1. 在 Selenium ChromeDriver 中禁用图像

        Disable images in Selenium ChromeDriver(在 Selenium ChromeDriver 中禁用图像)

                <bdo id='s7Uns'></bdo><ul id='s7Uns'></ul>

                <small id='s7Uns'></small><noframes id='s7Uns'>

                  <legend id='s7Uns'><style id='s7Uns'><dir id='s7Uns'><q id='s7Uns'></q></dir></style></legend>
                1. <tfoot id='s7Uns'></tfoot>
                    <tbody id='s7Uns'></tbody>
                  <i id='s7Uns'><tr id='s7Uns'><dt id='s7Uns'><q id='s7Uns'><span id='s7Uns'><b id='s7Uns'><form id='s7Uns'><ins id='s7Uns'></ins><ul id='s7Uns'></ul><sub id='s7Uns'></sub></form><legend id='s7Uns'></legend><bdo id='s7Uns'><pre id='s7Uns'><center id='s7Uns'></center></pre></bdo></b><th id='s7Uns'></th></span></q></dt></tr></i><div id='s7Uns'><tfoot id='s7Uns'></tfoot><dl id='s7Uns'><fieldset id='s7Uns'></fieldset></dl></div>
                2. 本文介绍了在 Selenium ChromeDriver 中禁用图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  尝试禁用 ChromeDriver 中的图像加载.我正在使用以下代码,但它仍在加载图像.有什么建议吗?

                  Trying to disable images loading in ChromeDriver. I'm using the following code, however it's still loading the images. Any suggestions?

                  DesiredCapabilities capabilities = DesiredCapabilities.Chrome();
                  capabilities.SetCapability("chrome.switches", new string[1] { "disable-images" });
                  IWebDriver driver = new ChromeDriver(@"C:chromedriver", capabilities);
                  

                  推荐答案

                  我遇到了同样的问题,我找到了答案 这里;

                  I had the same problem and I found the answer here;

                  Map<String, Object> contentSettings = new HashMap<String, Object>();
                  contentSettings.put("images", 2);
                  
                  Map<String, Object> preferences = new HashMap<String, Object>();
                  preferences.put("profile.default_content_settings", contentSettings);
                  
                  DesiredCapabilities caps = DesiredCapabilities.chrome();
                  caps.setCapability("chrome.prefs", preferences);
                  

                  这篇关于在 Selenium ChromeDriver 中禁用图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  C# namespace alias - what#39;s the point?(C# 命名空间别名 - 有什么意义?)
                  Using Xpath With Default Namespace in C#(在 C# 中使用具有默认命名空间的 Xpath)
                  Generating an EDMX from a DB2 Database(从 DB2 数据库生成 EDMX)
                  IBM .NET Data Provider Connection String issue with Library List(库列表的 IBM .NET 数据提供程序连接字符串问题)
                  .NET DB2 OLEDB pre-requisites(.NET DB2 OLEDB 先决条件)
                  Referring to Code in IBM.Data.DB2 makes that Assembly Unavailable to the rest of my Solution(引用 IBM.Data.DB2 中的代码使该程序集对我的解决方案的其余部分不可用)
                  <tfoot id='JK5D6'></tfoot>
                  <legend id='JK5D6'><style id='JK5D6'><dir id='JK5D6'><q id='JK5D6'></q></dir></style></legend>
                    • <bdo id='JK5D6'></bdo><ul id='JK5D6'></ul>

                          <tbody id='JK5D6'></tbody>

                          <small id='JK5D6'></small><noframes id='JK5D6'>

                            <i id='JK5D6'><tr id='JK5D6'><dt id='JK5D6'><q id='JK5D6'><span id='JK5D6'><b id='JK5D6'><form id='JK5D6'><ins id='JK5D6'></ins><ul id='JK5D6'></ul><sub id='JK5D6'></sub></form><legend id='JK5D6'></legend><bdo id='JK5D6'><pre id='JK5D6'><center id='JK5D6'></center></pre></bdo></b><th id='JK5D6'></th></span></q></dt></tr></i><div id='JK5D6'><tfoot id='JK5D6'></tfoot><dl id='JK5D6'><fieldset id='JK5D6'></fieldset></dl></div>