Demo: Automated Tests with Playwright + @cyborgtests/test (wit)
Choose one of the options below to get started. Both options provide full access to test editing and creation capabilities.
Pros:
- No local setup required
How to start:
- Click the "Open in Gitpod" button above
- Login or sign up using your
- Gitpod will automatically:
- Clone the repository
- Install dependencies
- Install Chromium
- Start the development server
- You'll be ready to test in under 2 minutes!
Pros:
- Offline development
- Does not require gitpod authorization
If something is missing, see Section 6: Installing Tools
- Git (any recent version)
- Node.js LTS (recommended 18.x or 20.x) + npm
- Playwright browsers (will install with a command below)
- (Optional) VS Code with Playwright Test for VSCode and ESLint extensions.
Check installations:
node -v
npm -v
git --versionHTTPS
git clone https://github.com/CyborgTests/demo-playwright-manual-step-automation.git
cd demo-playwright-manual-step-automationor SSH (if keys are set up)
git clone git@github.com:CyborgTests/demo-playwright-manual-step-automation.git
cd demo-playwright-manual-step-automationnpm install
npx playwright install --with-depsRun all tests in headless mode:
npx playwright testRun in UI Mode:
npx playwright test --uiRun a specific file/test/project:
# by file path
npx playwright test tests/example.spec.ts
# by test name pattern
npx playwright test -g "login"
# for a specific project from playwright.config (chromium / firefox / webkit)
npx playwright test --project=chromiumRun in headed mode:
npx playwright test --headedIn VS Code: open project folder → Testing tab → click Run Tests or use Playwright panel.
- Create a new file in
tests/, e.g.tests/login.spec.ts. - Add basic template:
import cyborgTest from "@cyborgtests/test";
import { expect } from "@playwright/test";
cyborgTest(
"Login should be successful",
async ({ page, manualStep }) => {
await page.goto('https://example.com/login');
await page.fill('#email', 'user@example.com');
await page.fill('#password', 'secret');
await page.click('button[type="submit"]');
await expect(page.getByText('Welcome')).toBeVisible();
// Example of a manual check step
await manualStep('Ensure logo is visible and aligned');
}
);- Run the test:
npx playwright test tests/login.spec.ts --headedor via UI Mode.
-
Windows: install Git for Windows.
-
macOS:
xcode-select --installor via Homebrew:brew install git. -
Linux (Ubuntu/Debian):
sudo apt update && sudo apt install -y git
-
Windows/macOS: use nvm or official installer from nodejs.org.
-
macOS (Homebrew):
brew install node
-
Linux (Ubuntu/Debian):
sudo apt update sudo apt install -y ca-certificates curl gnupg curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs
Check: node -v && npm -v
npx playwright install
# or for Linux with system dependencies
npx playwright install --with-deps(Optional) VS Code: download from official site, add Playwright and ESLint extensions.
- "command not found: git / node / npm" — install from section 6, restart terminal.
- Playwright cannot find browsers — run
npx playwright install. - Permission errors on Linux — use
sudofor system deps ornvmfor Node. - Incompatible Node version — switch to LTS (18/20) via nvm.
- Tests can’t find selectors — improve locators, use
await expect(...).toBeVisible(). - Private package not found — check
.npmrc/registry token.
Ask on our Discord or open an Issue in the demo repo. Good luck! 🚀