-
-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathelement.interfaces.ts
More file actions
41 lines (35 loc) · 1.82 KB
/
Copy pathelement.interfaces.ts
File metadata and controls
41 lines (35 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import type { ChainablePromiseElement } from 'webdriverio'
import type { BaseMobileWebScreenshotOptions, BaseWebScreenshotOptions, Folders } from '../base.interfaces.js'
import type { DefaultOptions } from '../helpers/options.interfaces.js'
import type { ResizeDimensions } from '../methods/images.interfaces.js'
import type { CheckMethodOptions } from './check.interfaces.js'
import type { RectanglesOutput } from '../methods/rectangles.interfaces.js'
export interface SaveElementOptions {
wic: DefaultOptions;
method: SaveElementMethodOptions;
}
export interface SaveElementMethodOptions extends Partial<Folders>, BaseWebScreenshotOptions, BaseMobileWebScreenshotOptions {
/**
* Resize the screenshot to the given dimensions
* @default undefined
*/
resizeDimensions?: ResizeDimensions;
/**
* BiDi-only: which coordinate origin to use when capturing element screenshots via the BiDi protocol.
* - `'document'` (default): renders the document layout, works for any element position but
* does NOT capture composited layers (scrollbars, fixed/sticky overlays, `will-change` elements).
* - `'viewport'`: captures the composited frame as painted, which includes scrollbars and overlays,
* but requires the element to be fully visible in the viewport. Throws a descriptive error when the
* element is outside, partially outside, or larger than the viewport.
* @default 'document'
*/
biDiOrigin?: 'document' | 'viewport';
}
export interface CheckElementMethodOptions extends SaveElementMethodOptions, CheckMethodOptions { }
export interface CheckElementOptions {
wic: DefaultOptions;
method: CheckElementMethodOptions;
}
/** The Wic element */
export type WicElement = WebdriverIO.Element | ChainablePromiseElement
export type ElementIgnore = RectanglesOutput | WicElement