我使用Watir作爲數據獲取作業,我不需要加載任何圖像。是否有可能阻止他們?如何阻止Watir中的圖像?
3
A
回答
1
禁用在瀏覽器中顯示圖像手動Watir驅動器,然後運行Watir腳本。據我所知,你不能從Watir本身做到這一點。
1
我認爲它可以:
profile = Selenium::WebDriver::Chrome::Profile.new
profile['webkit.webprefs.loads_images_automatically'] = false
@browser = Watir::Browser.new :chrome, :profile => profile
1
prefs = {
:profile => {
:managed_default_content_settings => {
:images => 2
}
}
}
b = Watir::Browser.new :chrome, :prefs => prefs
相關問題
- 1. 如何阻止網站中的Watir紅寶石寶石活動?
- 2. nginx阻止dokuwiki中的圖像
- 3. 如何在Android中阻止(true)阻止
- 4. Watir圖像處理
- 5. 阻止穿過牆壁的圖像
- 6. 如何阻止刷新頁面後上傳相同的圖像?
- 7. PhantomJS 1.8與蟒蛇上的硒。如何阻止圖像?
- 8. 如何阻止iPhone重新調整我的背景圖像?
- 9. 如何解決阻止圖像加載的Adobe Air SSL錯誤
- 10. 如何阻止NpgsqlDataReader阻塞?
- 11. 我如何阻止阻擋?
- 12. 如何獲取Watir中的圖像標題屬性?
- 13. Watir:識別圖像按鈕
- 14. 如何阻止從我的網站的圖像的所有內聯使用,我通過.htaccess阻止傳統的圖像鏈接到圖像?
- 15. Yii2 .htaccess阻止訪問後端圖像
- 16. 阻止IP從圖像盜鏈htaccess
- 17. 在CloudFlare中,如何阻止它阻止我的tumblr博客?
- 18. 如何阻止IIS通過.net來提供圖像(favicon.ico)。
- 19. 我如何阻止用Jquery加載圖像
- 20. 使用jQuery加載圖像,如何阻止緩存
- 21. 如何阻止UITableView重複使用圖像單元格數據?
- 22. 如何阻止瀏覽器加載圖像?
- 23. 如何阻止圖像出現在WebBrowser控件上?
- 24. 如何阻止div從重疊到圖像?
- 25. 如何阻止圖像被推離屏幕?
- 26. 如何從iFrame阻止圖像(img標籤)?
- 27. 如何阻止CGBitmapContextCreate從另一個視圖中拾取圖像數據?
- 28. Watir Webdriver:我如何禁止使用watir加載廣告
- 29. 如何使用watir將圖像保存在blob字段中?
- 30. 如何阻止html圖片移動?
非常感謝你。它運作良好。 :) – 2017-07-13 05:17:57