Selenium:Chrome驱动程序使屏幕截图仅显示页面的可见部分 [英] Selenium: chrome driver makes screenshot just of visible part of page
本文介绍了Selenium:Chrome驱动程序使屏幕截图仅显示页面的可见部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用chrome驱动程序对整个页面进行截图,但是部分实现了.
I need to do screenshot of full page using chrome driver, but it makes it partly.
File screenshotFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
屏幕截图显示为可见的矩形,下面有正确的信息,并且下方有较大的黑色区域.
The screenshot looks as visible rectangle with correct information and big black area below.
推荐答案
这是一个已知的错误: https://code.google.com/p/chromedriver/issues/detail?id=294 (仅适用于Chrome驱动程序,firefox驱动程序可以正常工作)
This is a known bug: https://code.google.com/p/chromedriver/issues/detail?id=294 (Only for Chrome driver, firefox driver works fine)
这篇关于Selenium:Chrome驱动程序使屏幕截图仅显示页面的可见部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文