import { TestDriver, TestElement } from '../UNSAFE_Driver'; import { ElementLocator } from '../UNSAFE_Locators'; /** * The base class for portable test adapters. Test adapters should extend this * class to provide uniform construction. */ export declare class TestAdapter { private _elementQuery; /** * Create the test adapter from the locator and optional TestDriver or TestElement. * If a driverOrElement is given, the locator will be searched from there. * @param locator The ElementLocator used to search for the component * @param driverOrElement The optional TestDriver or TestElement from which to search. If * TestElement is given, locator will search underneath that element. If TestDriver is given * or the parameter is undefined, the DOM is searched globally. */ constructor(locator: ElementLocator, driverOrElement?: TestDriver | TestElement); /** * Get the TestElement for the root DOM of this component. This method will query the DOM environment * for the matching element each time it's calld. Do not store the reference to the returned element. * It's recommended that this method be called each time element is needed, to avoid the chance that * the reference may become stale due to a rerender. * @returns Promise resolving to the TestElement for this adapter */ protected getElement(): Promise; protected getTestDriver(): TestDriver; }