Skip to content

Commit d6f02a8

Browse files
Add ScrollOption for native full page screenshot (#169)
1 parent bc9e061 commit d6f02a8

File tree

3 files changed

+114
-5
lines changed

3 files changed

+114
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@saucelabs/visual": minor
3+
"@saucelabs/nightwatch-sauce-visual-service": minor
4+
"@saucelabs/wdio-sauce-visual-service": minor
5+
---
6+
7+
Added control over scrolling to the top before and after capturing a native full-page screenshot.

visual-js/visual/src/graphql/__generated__/graphql.ts

+98-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

visual-js/visual/src/types.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { RegionIn, SelectorIn } from './graphql/__generated__/graphql';
1+
import {
2+
RegionIn,
3+
ScrollOption,
4+
SelectorIn,
5+
} from './graphql/__generated__/graphql';
26
import { SelectiveRegionOptions } from './common/selective-region';
37
import { SauceRegion } from './common/regions';
48

@@ -34,6 +38,10 @@ export type FullPageScreenshotOptions<T> =
3438
* Selector of an element that we should crop the screenshot to. Available only on native apps.
3539
*/
3640
nativeClipSelector?: SelectorIn;
41+
/**
42+
* Change scroll behaviour before and after taking full page screenshot. Available only on native apps.
43+
*/
44+
scrollOption?: ScrollOption;
3745
};
3846

3947
export type Ignorable<T> = T | T[] | Promise<T> | Promise<T[]> | RegionIn;

0 commit comments

Comments
 (0)