Full page screenshot support in Chrome#294
Full page screenshot support in Chrome#294malaskowski merged 40 commits intomilestone/chrome-supportfrom
Conversation
…anges. Removed form which caused screen comparator stabilization issues.
…x/aet-integration-tests-stabilization
… into bugfix/aet-integration-tests-stabilization
… into bugfix/aet-integration-tests-stabilization
… into bugfix/aet-integration-tests-stabilization
… into bugfix/aet-integration-tests-stabilization
…rade' into bugfix/aet-integration-tests-stabilization
…om:Cognifide/aet into bugfix/aet-integration-tests-stabilization
…Cognifide/aet into bugfix/aet-integration-tests-stabilization
…om:Cognifide/aet into bugfix/aet-integration-tests-stabilization
…fter HideModifier
malaskowski
left a comment
There was a problem hiding this comment.
Please update Open module documentation. Please describe how it works, what is does with Chrome (e.g. waiting for DOM objects). What are differences between Chrome and Firefox.
|
|
||
| @Deprecated | ||
| private boolean maximize; | ||
| private Optional<Integer> height; |
There was a problem hiding this comment.
Let's not use Optional as a type of a field. Please make it Integer.
| import org.openqa.selenium.WebDriver; | ||
| import org.openqa.selenium.remote.RemoteWebDriver; | ||
|
|
||
| import static org.mockito.Mockito.*; |
There was a problem hiding this comment.
Please don't use * in import.
| </urls> | ||
| </test> | ||
|
|
||
| <!-- Chrome shows this error in console (FF didn't) that's why this error is being filtered. TODO: Remove this test or mark it as Failed and correct bobcat assertions --> |
There was a problem hiding this comment.
I think it's ok to keep this JS error filter here and just remove this TODO
| localHeight = Integer | ||
| .parseInt(js.executeScript(JAVASCRIPT_GET_BODY_HEIGHT).toString()); | ||
| if (localHeight > MAX_SIZE) { | ||
| LOG.info("Height is over browser limit, changing height to " + MAX_SIZE); |
There was a problem hiding this comment.
Instead of string concatenation, use logger {} feature. And this should be warning.
| private static final String HEIGHT_PARAM = "height"; | ||
|
|
||
| private static final int MAX_SIZE = 100000; | ||
| private static final String JAVASCRIPT_GET_BODY_HEIGHT = "return document.body.scrollHeight"; |
There was a problem hiding this comment.
Please add those changes into resolution modifier documentation:
- height param is no longer mandatory,
- max page height,
- how does AET detect page height,
- remove
maximizeparameter
| @@ -24,6 +24,7 @@ | |||
| <test name="S-comparator-Layout"> | |||
There was a problem hiding this comment.
I'm missing here some tests, that will check page with auto-height detection and fixed-height, e.g.:
- there is always changing element at the bottom of a page, scenario:
Fwith auto-height detectionSwith fixed-height (let's say 100px), because screenshot does not contain this change
| |:----------------------- | | ||
| | In order to use this modifier it must be declared after the open module in the definition of the test suite XML. | | ||
| | *In order to use this modifier it must be declared after the open module in the definition of the test suite XML. | ||
| *In order to use this modifier with Resolution Modifier it must be declared before the Resolution Modifier.| |
There was a problem hiding this comment.
Please explain why - e.g. because the Hide modifier might affect the total height of the page (when used without leaveBlankSpace="true")
| |:----------------------- | | ||
| | You cannot maximize the window and specify the dimension at the same time. If you specify height param you have to also specify width param and vice versa. | | ||
| | Note | | ||
| | When height is not specified then it's compute by JavaScript. <br/> If the resolution is specified without height parameter it should be specified after open. | |
There was a problem hiding this comment.
Please fix the typo compute -> computed and make the open a link text that points to https://github.com/Cognifide/aet/wiki/Open
| if (params.containsKey(HEIGHT_PARAM)) { | ||
| height = NumberUtils.toInt(params.get(HEIGHT_PARAM)); | ||
| ParametersValidator | ||
| .checkRange(height, 1, MAX_SIZE, "Height should be greater than 0"); |
There was a problem hiding this comment.
Let's put here more verbose info:
"Height should be greater than 0 and smaller than " + MAX_SIZE
malaskowski
left a comment
There was a problem hiding this comment.
Please update CHANGELOG according to AET Contributing rules
Description
Updated nu.validator version from 15.6.29 to 17.11.1
Updated ResolutionModifier to take full page screenshots in Chrome.
Updated HideModifier wiki
Updated suites & tests
Motivation and Context
AET supports Chrome as well as Firefox
Screenshots (if appropriate):
Types of changes
Checklist:
I hereby agree to the terms of the AET Contributor License Agreement.