Assistive-Webdriver

Home > assistive-webdriver > isMatch

isMatch() function

Returns whether the text coming from the screen reader passed as the first parameter matches the expected text specified as the second parameter.

Signature:

export declare function isMatch(screenReaderText: string, expectedText: any): boolean;

Parameters

Parameter Type Description
screenReaderText string text coming from the screen reader
expectedText any expected text. See the remarks for more details about accepted types.

Returns:

boolean

true if the text coming from the screen reader matches the expected text, false otherwise.

Remarks

expectedText can be: