zerostep  by zerostep-ai

AI tool for Playwright tests

created 1 year ago
322 stars

Top 85.5% on sourcepulse

GitHubView on GitHub
Project Summary

Zerostep enhances Playwright test automation by enabling users to interact with web pages using natural language prompts. This tool is designed for QA engineers and developers looking to streamline test creation and maintenance by abstracting complex DOM interactions into simple, AI-driven commands.

How It Works

Zerostep leverages large language models (LLMs) to interpret natural language prompts and translate them into executable browser actions within Playwright. It analyzes the provided prompt, identifies the intended action (e.g., click, type, query data, assert a condition), and then uses Playwright's API to perform that action on the target web page. This approach aims to reduce the need for brittle selectors and complex scripting, allowing for more resilient and human-readable test code.

Quick Start & Requirements

  • Install via npm: $ npm i @zerostep/playwright -D
  • Requires a Zerostep token, configured via ZEROSTEP_TOKEN environment variable or zerostep.config.json.
  • Supports only Chromium browsers.
  • See examples and setup at https://zerostep.com/ and in the /examples/playwright-demo directory.

Highlighted Details

  • Supports single prompts or arrays of prompts for concurrent execution.
  • Offers options to control debugging, action type inference, model selection (currently only GPT_3.5), scrolling behavior, and parallelism.
  • Actions include click, hover, text input, enter keypress, scroll, and navigation. Queries retrieve data, and assertions return boolean values.
  • Playwright fixture available for cleaner integration, removing the need to pass page and test objects explicitly.

Maintenance & Community

  • Community support available via Discord.

Licensing & Compatibility

  • License details not explicitly stated in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Currently, Zerostep does not support advanced browser actions like drag-and-drop or file uploads. The AI model used is limited to GPT_3.5, and only Chromium browsers are supported. Prompt interpretation relies on the LLM's understanding, which may introduce variability or require careful prompt engineering for complex scenarios.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
32 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.