@serenity-js/webdriverio
Version:
Adapter that integrates @serenity-js/web with the latest stable version of WebdriverIO, enabling Serenity/JS reporting and using the Screenplay Pattern to write web and mobile test scenarios
33 lines • 1.68 kB
TypeScript
import 'webdriverio';
import type { PageElement, RootLocator, Selector } from '@serenity-js/web';
import { Locator } from '@serenity-js/web';
import type { WebdriverIOErrorHandler } from '../WebdriverIOErrorHandler.js';
/**
* WebdriverIO-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
*
* @group Models
*/
export declare class WebdriverIOLocator extends Locator<WebdriverIO.Element, string> {
private readonly errorHandler;
constructor(parent: RootLocator<WebdriverIO.Element>, selector: Selector, errorHandler: WebdriverIOErrorHandler);
protected nativeSelector(): string;
isPresent(): Promise<boolean>;
nativeElement(): Promise<WebdriverIO.Element>;
protected resolveNativeElement(): Promise<WebdriverIO.Element>;
allNativeElements(): Promise<Array<WebdriverIO.Element>>;
of(parent: WebdriverIOLocator): Locator<WebdriverIO.Element, string>;
closestTo(child: WebdriverIOLocator): Locator<WebdriverIO.Element, string>;
locate(child: WebdriverIOLocator): Locator<WebdriverIO.Element, string>;
element(): PageElement<WebdriverIO.Element>;
allElements(): Promise<Array<PageElement<WebdriverIO.Element>>>;
}
/**
* @internal
*/
export declare class WebdriverIOExistingElementLocator extends WebdriverIOLocator {
private readonly existingNativeElement;
constructor(parentRoot: RootLocator<WebdriverIO.Element>, selector: Selector, errorHandler: WebdriverIOErrorHandler, existingNativeElement: WebdriverIO.Element);
nativeElement(): Promise<WebdriverIO.Element>;
allNativeElements(): Promise<Array<WebdriverIO.Element>>;
}
//# sourceMappingURL=WebdriverIOLocator.d.ts.map