import type { ComponentFixtureProfile } from '../component-fixture'; import { O3rElement, O3rElementConstructor } from './element'; import { O3rGroup, O3rGroupConstructor } from './group'; export type { ComponentFixtureProfile, Constructable, FixtureWithCustom } from '../component-fixture'; /** * Implementation of the fixture dedicated to Playwright, hence using the webdriver to interact with the dom. */ export declare class O3rComponentFixture implements ComponentFixtureProfile { /** * DOM element linked to the fixture. */ protected rootElement: V; /** * Root element of this fixture. * All further queries will be applied to the element tree if any, otherwise they will be applied to the whole DOM. * @param rootElement */ constructor(rootElement: V); /** * Throws an exception if the element is undefined. * Otherwise returns the element. * @param element ElementProfile to test * @param timeout specific timeout that will throw when reach */ protected throwOnUndefinedElement(element?: T, timeout?: number): Promise; /** * Throws an exception if the element is undefined. * Otherwise returns the element. * @param element ElementProfile to test * @param timeout specific timeout that will throw when reach */ protected throwOnUndefined(element: Promise, timeout?: number): Promise; /** * Get the element associated to the selector if present * @param selector Selector to access the element * @param elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options Options supported * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element to be present before it throws */ protected queryWithOptions(selector: string, elementConstructor?: O3rElementConstructor, options?: { index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** * Get text from the element associated to the given selector, or undefined if the element is not found or not visible * @param selector Selector to access the element * @param options Options supported * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element */ protected getText(selector: string, options?: { elementConstructor?: O3rElementConstructor; index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** * Check if the element associated to the given selector is visible * @param selector Selector to access the element * @param options Options supported * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element */ protected isVisible(selector: string, options?: { elementConstructor?: O3rElementConstructor | undefined; index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** * Click on the element associated to the given selector if it exists and is visible * @param selector Selector to access the element * @param options Options supported * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element to be present before it throws */ protected click(selector: string, options?: { elementConstructor?: O3rElementConstructor | undefined; index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** @inheritdoc */ query(selector: string, returnType?: undefined): Promise; query(selector: string, returnType: O3rElementConstructor): Promise; /** @inheritdoc */ queryNth(selector: string, index: number, returnType?: undefined): Promise; queryNth(selector: string, index: number, returnType: O3rElementConstructor): Promise; /** @inheritdoc */ queryAll(_selector: string, _returnType?: undefined, groupType?: undefined, timeout?: number): Promise; queryAll(selector: string, returnType: O3rElementConstructor, groupType?: undefined, timeout?: number): Promise; queryAll>(selector: string, returnType: O3rElementConstructor, groupType: O3rGroupConstructor, timeout?: number): Promise; /** @inheritdoc */ getElement(): V; /** @inheritdoc */ getSubComponents(): Promise<{ [componentName: string]: ComponentFixtureProfile[]; }>; /** @inheritDoc */ queryNotPresent(selector: string): Promise; } //# sourceMappingURL=component-fixture.d.ts.map