Home > assistive-webdriver > forScreenReaderToSay
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>;
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>
await driver.wait(forScreenReaderToSay("Date of departure"), 5000);