Inconsistent screenshot height when height param in resolution modifier is omitted #357
Labels
enhancement
good first issue
This is great opportunity to start your adventure with AET.
help wanted
Hey, contributor! We need your help.
After switching to chromedriver one of the ways to obtain a full page screenshot is to omit the
height
attribute inresolution
modifier.After doing so, height of the window is set dynamically to the value of
document.body.scrollHeight
property.The problem is that the height is read immediately after the width of the window has been set.
This in worst case scenarios can lead to inconsistencies in window height and in result in screenshot height.
Please consider adding configurable delay between setting the window width and querying the window height.
Discussed solutions include:
document.body.scrollHeight
in some defined periods of time to check if thedocument.body.scrollHeight
changes. If defined number of samples would match, modifier would use it to set the window height eventually. This solution would require some threshold, either the number of samples or cumulated time of height readings.Either one of those solutions or both of them could be implemented.
The text was updated successfully, but these errors were encountered: