@ngx-playwright/test
Version:
77 lines • 2.68 kB
TypeScript
/**
* @file
* These functions run inside the browser via playwright's `evaluate` functions.
*
* Every function has to be pure. They cannot have any dependencies, not even to
* other functions in this file.
*/
/**
* Gets text of element excluding certain selectors within the element.
*
* @param {Element} element Element to get text from,
* @param {string} excludeSelector Selector identifying which elements to exclude
* @internal
* @returns {string}
*/
export function nativeInnerTextWithExcludedElements(element: Element, excludeSelector: string): string;
/**
* Blurs the given element
* @param {HTMLElement | SVGElement} element Element to blur
* @internal
*/
export function blur(element: HTMLElement | SVGElement): void;
/**
* Check whether the given element matches the given selector
*
* @param {Element} element Element to match
* @param {string} selector Selector to match the element against
* @returns {boolean} Whether the element matches the selector
* @internal
*/
export function matches(element: Element, selector: string): boolean;
/**
* Returns the dimensions of the given element
*
* @param {Element} element The element for which to get the dimensions
* @returns {import('@ngx-playwright/harness').ElementDimensions} The dimensions of the element
* @internal
*/
export function getBoundingClientRect(element: Element): import("@ngx-playwright/harness").ElementDimensions;
/**
* Returns the computed value for the given style property on the given element
*
* @param {Element} element The element for which to get the style property
* @param {string} styleProperty The style property to get
* @returns {string} The value for the style property
*/
export function getStyleProperty(element: Element, styleProperty: string): string;
/**
* Returns whether the angular app is bootstrapped
*
* @returns {boolean}
*/
export function isAngularBootstrapped(): boolean;
/**
* Waits until the angular app is stable
*
* @returns {Promise<void>}
*/
export function waitUntilAngularStable(): Promise<void>;
/**
*
* @param {Element} element
* @param {[string, Record<string, import('@ngx-playwright/harness').EventData>]} event
* @returns {void}
*/
export function dispatchEvent(element: Element, [name, properties]: [string, Record<string, import("@ngx-playwright/harness").EventData>]): void;
/**
* @param {Element} element
* @param {string} value
*/
export function setContenteditableValue(element: Element, value: string): void;
/**
* @param {Element} element
* @param {string} property
*/
export function getProperty(element: Element, property: string): any;
//# sourceMappingURL=../../src/harness/browser.d.ts.map