Open dontcallmedom opened 10 years ago
I thought we could fix this by adapting the browser window size depending on whether the calculated viewport.zoom is set to null or not; but while that works for getting the right content on the screenshot, it breaks our handling of media queries :(
What we would really need is to tell webdriver the size of the content we want to see rendered in the screenshot, independently of the size of the window; but that doesn't seem to be an option at the moment. Even asking for a screenshot of the full page (which we would then crop as needed) would work, but that's no longer a possibility with chromedriver: https://code.google.com/p/chromedriver/issues/detail?id=294
We could try to do it ourselves by scrolling and stitching several screenshots together (the same way people are working around the lack of "full page" screenshot in chromedriver), but that's kind of expensive and not reliable when there are fixed elements.
Not many options in front of us; except maybe if we switch to a firefox-based system? (firefox seems to do fullpage screenshot)
if we want to provide in the future different kind of browser, switch to firefox can't be the final solution...
fixed in using scrolling.
I don't think that fixes the issue I was reporting, so re-opening
Right now, when meta viewport set width to device-width, we render the page on a screen set to the size of the device-width and take a screenshot of that same size. While that behavior is correct for initial-scale=1, it's not for device-width where the zoom level is adjusted to the the widest part of the page.