This page is not available in every language. Missing translations are disabled in the language selector.

Quick reference

Zombie.js Cheatsheet

A quick reference guide for Zombie.js headless browser testing in Node.js: page navigation, form interaction, element queries, and assertions.

· Published

Zombie.js is a lightweight, full-stack headless browser testing solution for Node.js.

Browser Automation

Example Workflow

browser
  .visit("http://localhost:3000/", () => {})
  .fill("email", "[email protected]")
  .fill("password", "eat-the-living")
  .select("Born", "1985")
  .uncheck("Send newsletter")
  .clickLink("Link name")
  .pressButton("Sign", () => { ... })
  .text("H1")

Expectations & Assertions

expect(browser.query("#brains"))

expect(browser.body.queryAll(".hand")).length(2)

console.log(browser.html())
console.log(browser.html("table.parts"))

expect(Browser.text(".card-nopad small"), "A better way to get around!")

Related topics