2
試圖禁用在ChromeDriver中加載的圖像。我使用下面的代碼,但它仍然加載圖像。有什麼建議麼?在Selenium中禁用圖像ChromeDriver
DesiredCapabilities capabilities = DesiredCapabilities.Chrome();
capabilities.SetCapability("chrome.switches", new string[1] { "disable-images" });
IWebDriver driver = new ChromeDriver(@"C:\chromedriver\", capabilities);
我在Chrome命令行開關列表中看不到「禁用圖像」。我在快速谷歌搜索中看到了「--disable-images」的提及,但似乎並不奏效。 http://peter.sh/experiments/chromium-command-line-switches/ – Douglas 2012-02-24 15:21:43
是的。有幾處提到。有沒有遇到過這個網站,但不確定它是否是一個全面的列表。 – stats101 2012-02-24 15:42:04