wdio-wait-for
Version:
a library of conditions that are useful for end-to-end tests
15 lines (14 loc) • 659 B
TypeScript
import type { StringOrElement } from './../utils/element.types';
/**
* A condition for checking an element contains a specific text
*
* @example
* browser.waitUntil(textToBePresentInElement('.home', 'Home'));
*
* @param {!string | ChainablePromiseElement<WebdriverIO.Element>} selectorOrElement The selector or element to check
* @param {!string} expectedText The expected text to verify
*
* @returns {!function} A condition that returns a promise
* representing whether the element contains a specific text.
*/
export declare function textToBePresentInElement(selectorOrElement: StringOrElement, expectedText: string): () => Promise<boolean>;