wdio-wait-for / element/textToBePresentInElement
▸ textToBePresentInElement(selectorOrElement
, expectedText
): () => Promise
<boolean
>
A condition for checking an element contains a specific text
example
browser.waitUntil(textToBePresentInElement('.home', 'Home'));
Name | Type | Description |
---|---|---|
selectorOrElement |
StringOrElement |
The selector or element to check |
expectedText |
string |
The expected text to verify |
fn
A condition that returns a promise representing whether the element contains a specific text.
▸ (): Promise
<boolean
>
A condition for checking an element contains a specific text
example
browser.waitUntil(textToBePresentInElement('.home', 'Home'));
Promise
<boolean
>
A condition that returns a promise representing whether the element contains a specific text.