- Clone it to your local machine
git clone https://github.com/auto-browse/auto-browse-typescript-bdd-example.git
- Change directory to auto-browse-typescript-bdd-example
cd auto-browse-typescript-bdd-example
- Create a .env file in the root directory with your OpenAI API key
OPENAI_API_KEY=your_openai_api_key_here
LLM_MODEL=gpt-4o-mini # Optional, defaults to gpt-4o-mini
- Install dependencies
When using Auto Browse with playwright-bdd, you must use specific Playwright versions for compatibility:
"@playwright/test": "1.52.0-alpha-1743011787000"
"playwright": "1.52.0-alpha-1743011787000"
To handle version conflicts:
- Remove any existing Playwright installations
- Clear npm cache if needed:
npm cache clean --force
- Install dependencies with the legacy flag:
npm install --legacy-peer-deps
- Run the tests
npm run test
After test execution:
- Cucumber report will be generated in
cucumber-report
directory - To view the Playwright HTML report, run:
npx playwright show-report
- Test execution videos (
.webm
files) can be found intest-results
directory under each test execution