Assistive-Webdriver

Home > assistive-webdriver > forScreenReaderToSay

forScreenReaderToSay() function

Returns a selenium-webdriver Condition object usable with the wait method of selenium-webdriver.

Signature:

export declare function forScreenReaderToSay(expectedText: any, clean?: boolean): Condition<string[] | false>;

Parameters

Parameter Type Description
expectedText any specifies the expected text, in one of the ways documented for the expectedText parameter of isMatch().
clean boolean whether to clear from the cache all the screen reader messages until (and including) the message matched by expectedText. If this is false, the messages are kept in the cache, allowing them to be matched again.

Returns:

Condition<string[] | false>

Example

await driver.wait(forScreenReaderToSay("Date of departure"), 5000);