-
Notifications
You must be signed in to change notification settings - Fork 49
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
Full page screenshot support in Chrome #294
Full page screenshot support in Chrome #294
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use Optional
as a type of a field. Please make it Integer
.
import org.openqa.selenium.Dimension; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.remote.RemoteWebDriver; | ||
|
||
import static org.mockito.Mockito.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use *
in import.
@@ -35,14 +35,17 @@ | |||
</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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TODO
is done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of string concatenation, use logger {}
feature. And this should be warning
.
private static final String WIDTH_PARAM = "width"; | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add those changes into resolution modifier documentation:
- height param is no longer mandatory,
- max page height,
- how does AET detect page height,
- remove
maximize
parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated - 5f5e26c
@@ -24,6 +24,7 @@ | |||
<test name="S-comparator-Layout"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
F
with auto-height detectionS
with fixed-height (let's say 100px), because screenshot does not contain this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added - 0ae1f70
@@ -6,7 +6,8 @@ Module name: **hide** | |||
|
|||
| ! Important information | | |||
|:----------------------- | | |||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put here more verbose info:
"Height should be greater than 0 and smaller than " + MAX_SIZE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.