[英]Above the fold screenshots using watir-webdriver
我正在使用watir-webdriver來截屏,現在只給了我完整的網站截屏。 我如何才能看到首屏以外的內容?
當前代碼:
driver = Webdriver::UserAgent.driver(:browser => :firefox, :agent => :iphone, :orientation => ;landscape)
browser = Watir::Browser.new driver
browser.goto "http://forefathersgroup.com"
browser.driver.save_screenshot "forefathers.png
使用watir-webdriver無法僅獲得頁面的可見部分,因為此庫中使用的硒不提供此類功能。
因此,可能的解決方案之一是在創建屏幕快照后對其進行裁剪
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.