This package contains functions to be used with selenium-webdriver in order to test a web application with a screen reader.
Function | Description |
---|---|
addScreenReaderTextListener(webdriver, fn, scope) | Registers a listener function to be called each time a new message is coming from the screen reader. |
clearCachedScreenReaderText(webdriver) | Clears any locally cached screen reader text for the given instance of selenium-webdriver. |
forScreenReaderToSay(expectedText, clean) | Returns a selenium-webdriver Condition object usable with the wait method of selenium-webdriver. |
isMatch(screenReaderText, expectedText) | Returns whether the text coming from the screen reader passed as the first parameter matches the expected text specified as the second parameter. |
refreshScreenReaderText(webdriver) | Calls the assistive-webdriver server to get any new text coming from the screen reader, and, if there is any, synchronously calls listeners registered with addScreenReaderTextListener(). |
Variable | Description |
---|---|
SCREEN_READER_TEXT_COMMAND | Name of the command registered in selenium-webdriver to get the text from the screen reader. |
SCREEN_READER_TEXT_METHOD | HTTP method used on the assistive-webdriver server to get the text from the screen reader. |
SCREEN_READER_TEXT_PATH | HTTP path used on the assistive-webdriver server to get the text from the screen reader. |
Type Alias | Description |
---|---|
WebdriverLike | Direct reference to a selenium-webdriver WebDriver instance, or to an object containing a WebDriver instance as its driver property. |