Input Steps
Beginners: start with Creating Tests or Locators if you still need the workflow context. This page is the exact input-step reference.
Source: src/tests/steps/actions/input.step.ts.
See shared placeholder rules in Step Parameter Conventions.
Prefer installing published steps with npx appraisejs@latest add step ...
instead of adding the package to your project with npm install.
Use this when
Section titled “Use this when”Use input steps when the scenario must type, select, check, uncheck, or inject stored values into a form control.
Step catalog
Section titled “Step catalog”1. Fill input with literal value
Section titled “1. Fill input with literal value”Signature
Section titled “Signature”the user fills in the {string} input field with value {string}
Install with CLI
Section titled “Install with CLI”npx appraisejs@latest add step input/fillWhat it does
Section titled “What it does”- Resolves input locator.
- Fills input with provided literal value.
Parameters
Section titled “Parameters”| Parameter | Represents | Expected data |
|---|---|---|
First {string} | Input locator name | Existing locator key (for example emailInput). |
Second {string} | Value to type | Any text value (for example qa@example.com). |
Example
Section titled “Example”When the user fills in the "emailInput" input field with value "qa@example.com"2. Clear field
Section titled “2. Clear field”Signature
Section titled “Signature”the user clears the {string} field
Install with CLI
Section titled “Install with CLI”npx appraisejs@latest add step input/clearWhat it does
Section titled “What it does”- Resolves field locator.
- Clears existing value using Playwright
clear().
Parameters
Section titled “Parameters”| Parameter | Represents | Expected data |
|---|---|---|
{string} | Input locator name | Existing locator key (for example searchBox). |
Example
Section titled “Example”When the user clears the "searchBox" field3. Select dropdown option
Section titled “3. Select dropdown option”Signature
Section titled “Signature”the user selects the {string} option of the {string} dropdown
Install with CLI
Section titled “Install with CLI”npx appraisejs@latest add step input/select-dropdown-optionWhat it does
Section titled “What it does”- Resolves dropdown locator.
- Selects the option through
selectOption().
Parameters
Section titled “Parameters”| Parameter | Represents | Expected data |
|---|---|---|
First {string} | Option identifier | Option value/label (for example admin). |
Second {string} | Dropdown locator name | Existing locator key (for example roleSelect). |
Example
Section titled “Example”When the user selects the "admin" option of the "roleSelect" dropdown4. Check checkbox
Section titled “4. Check checkbox”Signature
Section titled “Signature”the user checks the {string} checkbox
Install with CLI
Section titled “Install with CLI”npx appraisejs@latest add step input/checkWhat it does
Section titled “What it does”- Resolves checkbox locator.
- Marks checkbox checked.
Parameters
Section titled “Parameters”| Parameter | Represents | Expected data |
|---|---|---|
{string} | Checkbox locator name | Existing locator key (for example termsCheckbox). |
Example
Section titled “Example”When the user checks the "termsCheckbox" checkbox5. Uncheck checkbox
Section titled “5. Uncheck checkbox”Signature
Section titled “Signature”the user unchecks the {string} checkbox
Install with CLI
Section titled “Install with CLI”npx appraisejs@latest add step input/uncheckWhat it does
Section titled “What it does”- Resolves checkbox locator.
- Marks checkbox unchecked.
Parameters
Section titled “Parameters”| Parameter | Represents | Expected data |
|---|---|---|
{string} | Checkbox locator name | Existing locator key (for example newsletterCheckbox). |
Example
Section titled “Example”When the user unchecks the "newsletterCheckbox" checkbox6. Fill input from stored variable
Section titled “6. Fill input from stored variable”Signature
Section titled “Signature”the user fills in the {string} input with data from the stored variable {string}
Install with CLI
Section titled “Install with CLI”npx appraisejs@latest add step input/fill-input-with-stored-valueWhat it does
Section titled “What it does”- Reads value from runtime variable store.
- Resolves input locator.
- Fills input with stored value.
Parameters
Section titled “Parameters”| Parameter | Represents | Expected data |
|---|---|---|
First {string} | Input locator name | Existing locator key (for example emailInput). |
Second {string} | Variable key | Existing runtime variable name (for example generatedEmail). |
Example
Section titled “Example”When the user fills in the "emailInput" input with data from the stored variable "generatedEmail"Common failures
Section titled “Common failures”- Any locator lookup failure throws immediately.
- Stored-variable fill fails when variable key does not exist.