This README.md
file provides the steps for installation, setting up OpenAI, and a usage example, making it easy to integrate auto-playwright
into Playwright tests.
Run Playwright tests using AI with auto-playwright
.
- Install the
auto-playwright
dependency:
npm install auto-playwright -D
- This package relies on talking with OpenAI (https://openai.com/). You must export the API token as an enviroment variable or add it to your .env file:
For MACFOR WINDOWSexport OPENAI_API_KEY='sk-...'
setx OPENAI_API_KEY 'sk-....'
- You need to purchase the API key online, there are costs associated with using OpenAI. You can find more pricing information here: https://openai.com/pricing/.
- Recommend using gpt-4 and above version to make your tests work without errors