Assistive-Webdriver

Home > assistive-playwright-client > 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: ExpectedText): boolean;

Parameters

Parameter Type Description
screenReaderText string text coming from the screen reader
expectedText ExpectedText expected text

Returns:

boolean

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