dom: { click: ((element: Element) => void); event: ((args: { element?: Element | Window & typeof globalThis | HTMLElement; event: string | Event; }) => void); getComputedStyle: ((element: Element | HTMLElement) => CSSStyleDeclaration); isElementVisible: ((element: Element,
previousElement?: Element) => boolean); qs: { <K>(selectors: K): null | HTMLElementTagNameMap[K]; <K>(selectors: K): null | SVGElementTagNameMap[K]; <K>(selectors: K): null | MathMLElementTagNameMap[K]; <K>(selectors: K): null | HTMLElementDeprecatedTagNameMap[K]; <E>(selectors: string): null | E; }; qsa: { <K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>; <K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>; <K>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>; <K>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>; <E>(selectors: string): NodeListOf<E>; }; sleep: ((ms: number) => Promise<void>); waitFor: ((args: string | { selector?: string; timeout?: number; visible?: boolean; },
lambda?: (() => null | Element)) => Promise<Element | null>); waitForText: ((args: { element: Element; multipleTags?: boolean; regex?: RegExp; text?: string; timeout?: number; }) => Promise<Element | null>); } = ... Type declaration
click: ((element: Element) => void)
- (element): void
Returns void
event: ((args: {
element?: Element | Window & typeof globalThis | HTMLElement;
event: string | Event;
}) => void)
- (args): void
Parameters
- args: {
element?: Element | Window & typeof globalThis | HTMLElement;
event: string | Event;
}Optional
element?: Element | Window & typeof globalThis | HTMLElement
event: string | Event
Returns void
getComputedStyle: ((element: Element | HTMLElement) => CSSStyleDeclaration)
- (element): CSSStyleDeclaration
Parameters
- element: Element | HTMLElement
Returns CSSStyleDeclaration
isElementVisible: ((element: Element, previousElement?: Element) => boolean)
- (element, previousElement?): boolean
Parameters
- element: Element
Optional
previousElement: Element
Returns boolean
qs: {
<K>(selectors: K): null | HTMLElementTagNameMap[K];
<K>(selectors: K): null | SVGElementTagNameMap[K];
<K>(selectors: K): null | MathMLElementTagNameMap[K];
<K>(selectors: K): null | HTMLElementDeprecatedTagNameMap[K];
<E>(selectors: string): null | E;
}
- <K>(selectors): null | HTMLElementTagNameMap[K]
Type Parameters
- K extends keyof HTMLElementTagNameMap
Returns null | HTMLElementTagNameMap[K]
- <K>(selectors): null | SVGElementTagNameMap[K]
Type Parameters
- K extends keyof SVGElementTagNameMap
Returns null | SVGElementTagNameMap[K]
- <K>(selectors): null | MathMLElementTagNameMap[K]
Type Parameters
- K extends keyof MathMLElementTagNameMap
Returns null | MathMLElementTagNameMap[K]
- <K>(selectors): null | HTMLElementDeprecatedTagNameMap[K]
Type Parameters
- K extends keyof HTMLElementDeprecatedTagNameMap
Returns null | HTMLElementDeprecatedTagNameMap[K]
- <E>(selectors): null | E
Type Parameters
- E extends Element = Element
Returns null | E
qsa: {
<K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
<K>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
<K>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
<E>(selectors: string): NodeListOf<E>;
}
- <K>(selectors): NodeListOf<HTMLElementTagNameMap[K]>
Type Parameters
- K extends keyof HTMLElementTagNameMap
Returns NodeListOf<HTMLElementTagNameMap[K]>
- <K>(selectors): NodeListOf<SVGElementTagNameMap[K]>
Type Parameters
- K extends keyof SVGElementTagNameMap
Returns NodeListOf<SVGElementTagNameMap[K]>
- <K>(selectors): NodeListOf<MathMLElementTagNameMap[K]>
Type Parameters
- K extends keyof MathMLElementTagNameMap
Returns NodeListOf<MathMLElementTagNameMap[K]>
- <K>(selectors): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
Type Parameters
- K extends keyof HTMLElementDeprecatedTagNameMap
Returns NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
- <E>(selectors): NodeListOf<E>
Type Parameters
- E extends Element = Element
Returns NodeListOf<E>
sleep: ((ms: number) => Promise<void>)
- (ms): Promise<void>
Returns Promise<void>
waitFor: ((args: string | {
selector?: string;
timeout?: number;
visible?: boolean;
}, lambda?: (() => null | Element)) => Promise<Element | null>)
- (args, lambda?): Promise<Element | null>
Parameters
- args: string | {
selector?: string;
timeout?: number;
visible?: boolean;
} Optional
lambda: (() => null | Element)- (): null | Element
Returns null | Element
Returns Promise<Element | null>
The HTML element
waitForText: ((args: {
element: Element;
multipleTags?: boolean;
regex?: RegExp;
text?: string;
timeout?: number;
}) => Promise<Element | null>)
- (args): Promise<Element | null>
Parameters
- args: {
element: Element;
multipleTags?: boolean;
regex?: RegExp;
text?: string;
timeout?: number;
}element: Element
Optional
multipleTags?: boolean
Optional
regex?: RegExp
Optional
text?: string
Optional
timeout?: number
Returns Promise<Element | null>
Click the given element.