selenium webdriver - ChromeDriver screenshot not showing whole document if window size were set? -


using chrome selenium driver, not getting screenshots showing whole document if browser dimension set me instead of keeping dimensions got automatically.

i create chrome driver this:

iwebdriver browser = new chromedriver();  browser.manage().window.size = new size(1024, 768); 

i take screenshot this:

var screenshot = browser.takescreenshot(); screenshot.saveasfile("c:\\screenshot.png", imageformat.png); 

the screenshot size 1014x686, expected, because should cover document, depicts bottom part of webpage instead of whole webpage.

why?

if not setting window size, screenshot seems correct.

unfortunately, limitation of current chrome driver. it's been logged an issue in issue tracker. driver bug, in turn, dependent on fix a bug in chromium itself. until parent bug in chromium fixed, there's nothing chromedriver or selenium project can work around problem proper amount of reliability , fidelity.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -