Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent screenshot height when height param in resolution modifier is omitted #357

Closed
michalwronowski opened this issue Sep 14, 2018 · 0 comments · Fixed by #397
Closed
Assignees
Labels
enhancement good first issue This is great opportunity to start your adventure with AET. help wanted Hey, contributor! We need your help.

Comments

@michalwronowski
Copy link
Contributor

After switching to chromedriver one of the ways to obtain a full page screenshot is to omit the height attribute in resolution 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:

  1. Configurable "cooldown" in milliseconds which would cause the test to sleep for configured time.
  2. Configurable "wait-for-height" algorithm, which would query document.body.scrollHeight in some defined periods of time to check if the document.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.

@malaskowski malaskowski added enhancement help wanted Hey, contributor! We need your help. good first issue This is great opportunity to start your adventure with AET. labels Sep 17, 2018
tkaik added a commit that referenced this issue Sep 21, 2018
malaskowski pushed a commit that referenced this issue Sep 24, 2018
…-issues

[#357] UpgradeNotes wiki entry with possible workarounds
@Jakub-Izbicki Jakub-Izbicki self-assigned this Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue This is great opportunity to start your adventure with AET. help wanted Hey, contributor! We need your help.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants