A step definition is a piece of JavaScript that maps a plain English Gherkin phrase (for example When I press "Submit") to a Playwright action or assertion. Webship-js ships 411 built-in steps across 36 step files, so Product Owners, PMs, QA, CQ, DevOps, and automation engineers can author end-to-end tests without writing custom code.
The four sections below organise every step group by how teams use them. Click any card to see the full step list with role-targeted explanations and examples.
User journeys
How the visitor moves through your site and interacts with the page.
NavigationAnonymous user, homepage, paths, history, URL assertions.ActionsPress, click, follow links, attach files. The fundamentals.FormsFill, select, check, uncheck, radio by label, placeholder, name.Field stateAssert what is in inputs, selects, checkboxes, radios.Pointer inputHover, drag, double-click, right-click, viewport size, tap.KeyboardSingle keys and combos with alias normalisation.ScrollingPage and element scroll: top, bottom, into view.LinksLink href, title, target, rel assertions.ModalsHTML modal visibility, content, scoped clicks, close.Browser dialogsNative alert, confirm, prompt handling. Outcome verification
What the page shows, how it is structured, what the server returned.
AssertionsPage-level text and element assertions, including row and scope.Web-first matchersAuto-retrying matchers with a within-N-seconds budget.Element interactionsFocus, scroll-to, click-on-element, dispatch events, position.TablesData table row and column assertions.Meta tagsDescription, keywords, Open Graph, Twitter card assertions.Response headersInspect cache, security, and CDN headers per release. APIs and data formats
Drive REST endpoints, inspect JSON, XML, and YAML payloads directly from Gherkin.
Test resilience and instrumentation
Smart waits, mocked dependencies, accessibility audits, visual evidence, debug hooks.
WaitsSmart waits, edge waits, never sleep.Clockpage.clock install, advance, pause, set. Deterministic time.NetworkRoute stubs, mocks, delays, offline mode.StorageLocal and session storage assertions.CookiesCookie existence and value assertions.Auth stateSave and restore storageState for session re-use.JavaScript errorsTrack and assert clean console.AccessibilityPOUR smoke checks: alt text, labels, landmarks, focus, lang.IframesFrame switching and frame-scoped interactions.File downloadsCapture downloads and assert filename / content.Selector registryNamed CSS and XPath plus 22 CMS / framework presets.Responsive viewportsNamed breakpoints (xs to xxxl) plus explicit sizing.ScreenshotsManual capture, auto-on-failure, per-step hooks.Video recordingPlaywright recordVideo with start, stop, save steps.DebugPrint URL, last response. Pause for inspection. Where the steps live
Source code: tests/step-definitions/<group>.steps.js. Every file exports a JSDoc block with at least five Gherkin examples per step, and every step phrasing supports the pronoun prefix (I |we )* so your scenarios read naturally in either voice.