Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub-Izbicki committed Oct 16, 2018
1 parent 2b37541 commit dac9662
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to AET will be documented in this file.

## Unreleased
**List of changes that are finished but not yet released in any final version.**
- [PR-397](https://github.com/Cognifide/aet/pull/397) Add algorithm to enable taking long screenshots without resolution-sleep-resolution workaround

## Version 3.0.1

Expand Down
35 changes: 5 additions & 30 deletions documentation/src/main/wiki/ResolutionModifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ Module name: **resolution**
| --------- | ----- | ----------- | --------- |
| `width` | int (1 to 15000) | Window width | yes |
| `height` | int (1 to 15000) | Window height | no |
| `samplingPeriod` | int (milliseconds) | Used when `height` is not defined. Defaults to 100ms (see notes below) | no |

TODO: Change 15000 to 35000 when (https://github.com/Cognifide/aet/pull/387) is merged.

| Note |
|:------ |
| When height is not specified then it's computed by JavaScript (using `document.body.scrollHeight` property). |
| When `height` is not specified then it's computed by JavaScript (using `document.body.scrollHeight` property). |
| For very long pages, it may take some time to render the page in order to get its full height, so AET is using an algorithm that samples the page's height over some specified period of time. `samplingPeriod` specifies the amount of time between taking each sample. If defined number of samples would match (3 last samples) or when the max number of samples is reached (15), the acquired valued is used as `height` resolution for screenshot.|
| **If the resolution is specified without height parameter it should be specified after [`open`](https://github.com/Cognifide/aet/wiki/Open)** and after all modifiers which may affect the page height (e.g. [`hide`](https://github.com/Cognifide/aet/wiki/HideModifier)) |

##### Example Usage
Expand Down Expand Up @@ -47,35 +51,6 @@ Module name: **resolution**
</suite>
```

##### Known issues

[#357](https://github.com/Cognifide/aet/issues/357) - If you're using the auto-height calculation feature of [[Resolution Modifier|ResolutionModifier]], it may happen that the
height of collected screenshot is different every time you run the suite, which results in failures on the report.
Currently you can use one of following workarounds to fix this issues:
* specify the `height` parameter manually with a value which is equal or greater than the height of page you want to test, e.g.:
```$xml
<open/>
<resolution width="1366" height="5000"/>
<scren/>
```
* use an additional `resolution` modifier with any `height` (value doesn't matter) before the `open` phase - to ensure that
the page will be opened with desired `width` and the 2nd `resolution` will only compute and change the height.
```$xml
<resolution width="1366" height="100"/>
<open/>
<resolution width="1366"/>
<scren/>
```
* use two `resolution` modifiers with the same `width` attribute (the first one may also have `height` attribute with any value)
and a `sleep` modifier between them, e.g:
```$xml
<open/>
<resolution width="1366"/>
<sleep duration="1000"/>
<resolution width="1366"/>
<scren/>
```

#### Tips and tricks

In order to make sure that your screenshots have the resolution you expect them to have you need to test it first.
Expand Down
5 changes: 0 additions & 5 deletions documentation/src/main/wiki/UpgradeNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ Please see latest [[Screen Collector|ScreenCollector]] and [[Resolution Modifier
* The [[Open|Open]] may take more time to complete now, because it waits for all images to be loaded.
[[Wait For Image Completion Modifier|WaitForImageCompletionModifier]] is no longer needed, unless you want to wait for an image which is loaded asynchronously (e.g. by an AJAX call)

##### Known issues

* [#357](https://github.com/Cognifide/aet/issues/357) - see Known issues section in [[Resolution Modifier|ResolutionModifier]] wiki
for possible workarounds.

#### `aet-maven-plugin` marked as deprecated
That means it will be no longer supported after release of this version and expect it will be removed soon.
Please use [[client script|ClientScripts]] instead or simply communicate with AET Web API to schedule your suite.
Expand Down

0 comments on commit dac9662

Please sign in to comment.