test-real-styles
Version:
utilities to test real styling of dom elements
9 lines (8 loc) • 355 B
TypeScript
import { Page } from 'playwright';
export type Options = {
normalize?: (value: string, prop: keyof CSSStyleDeclaration) => string;
pseudoElt?: string;
};
export declare function getStyles<T extends (keyof CSSStyleDeclaration)[]>(page: Page, selector: string, props: T, { normalize, pseudoElt }?: Options): Promise<{
[key in T[0]]: string;
}>;