Webship JS 2.0.x

Webship-js is a BDD-first browser automation harness built on Playwright and Cucumber-js. Plain Gherkin feature files, a named-selector registry that survives redesigns, and BBR smart waits that never sleep.

411 built-in steps across 36 step files. 288 example scenarios / 1,406 step executions in the bundled suite, all green on chromium, firefox, and webkit.

At a glance

Feature: Login page
  Scenario: Successful login
    Given I am on homepage
     When I go to "login.html"
      And I fill in "Username" with "Smith"
      And I fill in "Password" with "1$34"
      And I press "Login"
     Then I should see "Welcome Smith"

Highlights in 2.0.x

  • BBR smart waits. Every wait composites DOM-ready, networkidle, custom AJAX and timer counters, and a 250 ms DOM-quiet window. No sleep N seconds in step bodies.
  • Named selector registry. Register CSS or XPath under stable names and survive markup churn. 22 CMS / framework presets ship out of the box.
  • Web-first assertions. Auto-retrying matchers with a within N seconds budget.
  • Tester-friendly error handling. Structured friendly() + humanize() with stdout filter so failures explain themselves.
  • Video recording. Playwright recordVideo with start, stop, save steps. Modes: off, on, on-failure, tag.
  • REST / API / XML / YAML. Direct HTTP, JSON Pointer, XPath, multi-doc YAML and JSON Schema, all from Gherkin.
  • Accessibility. POUR smoke checks and axe-core audits.
  • Cross-browser. chromium, firefox, webkit. BROWSER=firefox npm test.

Run modes

ScriptEffect
npm testDefault. Pretty output, slow-mo 300 ms.
npm run test:headedHeaded browser, SLOW_MO=800.
npm run test:fastSLOW_MO=0, single-process.
BROWSER=<engine> npm testPick browser engine (chromium, firefox, webkit).

For parallel and retry pass CLI flags directly:

npx cucumber-js --parallel 4 --retry 1 --retry-tag-filter @flaky

Documentation map

  1. Install Webship JS. Install and project layout.
  2. Global Settings. cucumber.js worldParameters reference.
  3. Step Definitions. The 36 step groups organised by audience.
  4. DDEV Webship-JS. DDEV add-on variant.
  5. Diffy Step Definitions. Visual-diff workflow.

Browse step groups directly

Every step group is now a direct child of this page. Quick links:

Accessibility Actions API (long) Assertions Auth state Clock Cookies Debug Browser dialogs Element interactions Field state File downloads Forms Iframes Pointer input JavaScript errors Keyboard Links Meta tags Modals Navigation Network URL paths Response headers Responsive viewports REST (short) Screenshots Scrolling Selector registry Storage Tables Video recording Waits Web-first matchers XML YAML

Benefits

Increased testing efficiency, reduced human error, improved test coverage, faster time-to-market. By automating the repetitive, the suite frees testers to focus on the exploratory and the critical.