在 Protractor API 文档之后应该有是一种截取整个页面的方法,而不仅仅是可见的框架.事实上它应该是默认行为.
Following Protractor API documentation there should be a way to take screenshot of entire page, not only visible frame. In fact it should be default behaviour.
当 takeScreenshot() 被调用时
browser.takeScreenshot().then(function (png) {
// writing down image
});
然后在文件中保存选项 3.来自文档 - '当前帧的可见部分'.如何强制webdriver全屏截图?
Then in file is saved option 3. from documentation - 'Visible portion of current frame'. How to force webdriver to take full page screenshot?
chrome 上有个bug.https://bugs.chromium.org/p/chromium/issues/detail?id=45209https://bugs.chromium.org/p/chromedriver/issues/detail?id=294
更改浏览器高度后(browser.driver.manage().window().setSize(320, 2000);),Firefox 会截取整个页面,Chrome 不会.
there is a bug on chrome.
https://bugs.chromium.org/p/chromium/issues/detail?id=45209
https://bugs.chromium.org/p/chromedriver/issues/detail?id=294
After change browser height(browser.driver.manage().window().setSize(320, 2000);), Firefox will take entire page screenshot, but not Chrome.
这篇关于如何在量角器中截取整个页面的屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
即使在调用 abort (jQuery) 之后,浏览器也会等待Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在调用 abort (jQuery) 之后,浏览器也会等待 ajax 调用
JavaScript innerHTML 不适用于 IE?JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不适用于 IE?)
XMLHttpRequest 无法加载,请求的资源上不存在“AXMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 无法加载,请求的资
XHR HEAD 请求是否有可能不遵循重定向 (301 302)Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 请求是否有可能不遵循重定向 (301 302))
XMLHttpRequest 206 部分内容XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分内容)
XMLHttpRequest 的 getResponseHeader() 的限制?Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)