Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1.35 KB

element_texttobepresentinelement.md

File metadata and controls

52 lines (30 loc) · 1.35 KB

wdio-wait-for / element/textToBePresentInElement

Module: element/textToBePresentInElement

Table of contents

Functions

Functions

textToBePresentInElement

textToBePresentInElement(selectorOrElement, expectedText): () => Promise<boolean>

A condition for checking an element contains a specific text

example browser.waitUntil(textToBePresentInElement('.home', 'Home'));

Parameters

Name Type Description
selectorOrElement StringOrElement The selector or element to check
expectedText string The expected text to verify

Returns

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'));

Returns

Promise<boolean>

A condition that returns a promise representing whether the element contains a specific text.

Defined in

element/textToBePresentInElement.ts:17