Web helpers
These are the public helpers the web steps are built on. Your own step definitions call them on $this, the same way the shipped steps do, as Scenario styles explains. A page gives each helper of a trait or class a signature and a description, and Root context covers what WebRawContext itself adds.
HELPERS.md holds these helpers and the Drupal helpers on 1 page. It ships with the package, so an AI coding agent in your project can read it from vendor/.
| Name | Class | Helpers | Description |
|---|---|---|---|
| Accessibility | AccessibilityTrait | 21 | Assess accessibility of rendered pages. |
| Basic authentication | BasicAuthTrait | 1 | Keep HTTP basic authentication applied across session resets. |
| Cookies | CookieTrait | 4 | Verify and inspect browser cookies. |
| Dropzone uploads | DropzoneTrait | 1 | Simulate a real multi-file drag-and-drop gesture onto a Dropzone target. |
| Elements | ElementTrait | 8 | Interact with HTML elements using CSS selectors and DOM attributes. |
| Failure diagnostics | DiagnosticsTrait | 12 | Append on-failure diagnostics to the failure message of any failed step. |
| File downloads | FileDownloadTrait | 8 | Test file download functionality with content verification. |
| Fixture files | FixtureDirectoryTrait | 5 | Resolves fixture files in the directory Mink's files_path parameter names. |
| Form fields | FieldTrait | 13 | Manipulate form fields and verify widget functionality. |
| Headings | HeadingTrait | 1 | Finds a heading by its text within the page or an element of it. |
| Iframes | IframeTrait | 1 | Switch between iframes and the root document. |
| JavaScript errors | JavascriptTrait | 2 | Automatically detect JavaScript errors during test execution. |
| JSON responses | JsonTrait | 7 | Assert JSON responses with path and schema checks. |
| Mapped values | MappingTrait | 3 | Replace {{ Key }} tokens in step arguments and table cells. |
| Messages | MessageTrait | 3 | Assert status, error, warning and success messages rendered on the page. |
| Meta tags | MetatagTrait | 14 | Assert <meta> tags and head/SEO markup in page markup. |
| Modals | ModalTrait | 9 | Interact with and assert modals. |
| Page regions | RegionTrait | 4 | Interact with and assert against named page regions. |
| Paths | PathTrait | 4 | Navigate and verify paths with URL validation. |
| Random values | RandomTrait | 10 | Replace random-value tokens in step arguments and table cells. |
| Relative dates | DateTrait | 3 | Convert relative date expressions into timestamps or formatted dates. |
| Request headers | RequestHeadersTrait | 1 | Holds the request headers shared by the traits that issue HTTP requests. |
| Responsive layouts | ResponsiveTrait | 7 | Test responsive layouts with viewport control. |
| REST APIs | RestTrait | 2 | Test REST APIs with lightweight steps. |
| Root context | WebRawContext | 21 | Root context carrying the plumbing every suite needs. |
| Shell commands | CommandTrait | 2 | Run local shell commands and assert on their result. |
| Tables | TableTrait | 10 | Interact with HTML table elements and assert their content. |
| Vertical tables | TableTransposeTrait | 2 | Reads a vertical Gherkin table as 1 set of values per entity. |
| Waits | WaitTrait | 2 | Wait for a period of time or for AJAX to finish. |
| XML responses | XmlTrait | 9 | Assert XML responses with element and attribute checks. |