Web steps
These steps work on any website, whatever it's built with. WebContext composes all of them, and so does DrupalContext, which extends it. A trait's page gives each of its steps an example and lists the options and the prerequisites the trait declares.
STEPS.md holds these steps and the Drupal steps on 1 page. It ships with the package, so an AI coding agent in your project can read it from vendor/.
| Name | Trait | Description |
|---|---|---|
| Accessibility | AccessibilityTrait | Assess accessibility of rendered pages. |
| Basic authentication | BasicAuthTrait | Keep HTTP basic authentication applied across session resets. |
| Cookies | CookieTrait | Verify and inspect browser cookies. |
| Dropzone uploads | DropzoneTrait | Simulate a real multi-file drag-and-drop gesture onto a Dropzone target. |
| Elements | ElementTrait | Interact with HTML elements using CSS selectors and DOM attributes. |
| Failure diagnostics | DiagnosticsTrait | Append on-failure diagnostics to the failure message of any failed step. |
| File downloads | FileDownloadTrait | Test file download functionality with content verification. |
| Form fields | FieldTrait | Manipulate form fields and verify widget functionality. |
| Iframes | IframeTrait | Switch between iframes and the root document. |
| JavaScript errors | JavascriptTrait | Automatically detect JavaScript errors during test execution. |
| JSON responses | JsonTrait | Assert JSON responses with path and schema checks. |
| Keyboard | KeyboardTrait | Simulate keyboard interactions in the browser. |
| Links | LinkTrait | Verify link elements with attribute and content assertions. |
| Mapped values | MappingTrait | Replace {{ Key }} tokens in step arguments and table cells. |
| Messages | MessageTrait | Assert status, error, warning and success messages rendered on the page. |
| Meta tags | MetatagTrait | Assert <meta> tags and head/SEO markup in page markup. |
| Modals | ModalTrait | Interact with and assert modals. |
| Page regions | RegionTrait | Interact with and assert against named page regions. |
| Paths | PathTrait | Navigate and verify paths with URL validation. |
| Random values | RandomTrait | Replace random-value tokens in step arguments and table cells. |
| Relative dates | DateTrait | Convert relative date expressions into timestamps or formatted dates. |
| Response headers | ResponseTrait | Verify HTTP response headers. |
| Responsive layouts | ResponsiveTrait | Test responsive layouts with viewport control. |
| REST APIs | RestTrait | Test REST APIs with lightweight steps. |
| Shell commands | CommandTrait | Run local shell commands and assert on their result. |
| Tables | TableTrait | Interact with HTML table elements and assert their content. |
| Waits | WaitTrait | Wait for a period of time or for AJAX to finish. |
| XML responses | XmlTrait | Assert XML responses with element and attribute checks. |