This scenario demonstrates how to automate testing the spell check functionality of a web application using TestDriver’s capabilities. The test will check if the spell checker correctly identifies and suggests corrections for misspelled words in a text input field.

Prerequisites

Before running the tests, ensure you have performed the following steps:

  1. If you haven’t already, signup for a Free Trial on the TestDriver website
  2. Install the TestDriver CLI globally using npm or just follow the VS Code Extension Setup Walkthrough:
npm install -g @testdriverai@beta
  1. Run the init command to set up the TestDriver configuration using the API key you got when you signed up for the trial:
testdriverai init
Now you are ready to run the tests!

Scenario overview

  1. Open up a webpage that has text input and a spell check function.
  2. Enter a misspelled word into the text input field.
  3. Trigger the spell check function (for example, by clicking a button or losing focus on the input field).
  4. Verify that the spell checker identifies the misspelled word and provides suggestions for correction.
  5. Optionally, select a suggestion and apply it to the text input field.