
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
playwright-ai-bot
Advanced tools
PlayBot is an AI-powered CLI tool designed to accelerate the development and maintenance of Playwright test automation.
PlayBot is an AI-powered CLI tool designed to accelerate the development and maintenance of Playwright test automation.
For first experiments, we created a demo project with basic setup.
npm install --save-dev playwright-ai-bot
npx playwright-ai-bot <command> [options]
Command | Description |
---|---|
crawl <url> | Crawl the web app and collect data |
stories | Generate user stories |
tests | Generate test cases from stories |
code | Generate executable code from tests |
Usage: playwright-ai-bot [options] [command]
PlayBot: AI-powered CLI tool that speeds up the development and maintenance of Playwright test automation.
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
crawl [options] [url] Simple crawler for the tested web apps to collect data about it and generate user stories, test cases, and code. For more complex
use cases, please provide your own implementation and store data in the playbot-data folder (screenshot, html, minimized html) or
contact us to integrate it with Wopee.io bot.
stories [options] Create a new story
tests [options] Create a new test
code Create or update code based on the provided test cases
help [command] display help for command
Create a playbot.config.js
file in your project root:
const config = {
baseUrl: 'https://dronjo.wopee.io',
aiModel: 'gpt-4o-mini',
apiKey: process.env.OPENAI_API_KEY || '',
frameworkPath: 'docs',
framework: 'playwright', // Not implemented yet (TODO): playwright, cypress, robot-framework, webdriver-io
frameworkPath: 'tests',
};
// CommonJS export = type: "commonjs" in package.json (default behavior)
module.exports = config;
// ES Module export = type: "module" in package.json
// export default config;
Set up your .env file with the Open AI API key:
OPENAI_API_KEY=super-secret-key
Other LLM providers to be added later. Currently Azure OpenAI is available and and Wopee.io endpoint will be prepared in early 2025. In order to set it up you need to enhance .env
file by adding following parameters (example):
AI_PROVIDER=azure
AI_MODEL=gpt-4o
AZURE_OPENAI_ENDPOINT=https://marcel-experiments.openai.azure.com/
AZURE_DEPLOYMENT_NAME=gpt-4o
AZURE_API_VERSION=2024-08-01-preview
AZURE_OPENAI_API_KEY=super-secret-key
Config need to be adjusted as follows:
const config = {
baseUrl: 'https://dronjo.wopee.io',
aiProvider: process.env.AI_PROVIDER || 'openai', // Options: wopee-io, openai, azure
aiModel: process.env.AI_MODEL || 'gpt-4o-mini',
apiKey: process.env.OPENAI_API_KEY || '',
// Azure-specific configurations (only used when aiProvider is 'azure')
azureEndpoint: process.env.AZURE_OPENAI_ENDPOINT || '',
azureDeploymentName: process.env.AZURE_DEPLOYMENT_NAME || '',
framework: 'playwright',
frameworkPath: 'test-framework/tests',
};
export default config;
This is very early version - feedback more than welcome.
npx playwright codegen --save-storage=auth.json
auth.json
with storage contentThis is example from Sauce demo app after logging in with standard_user
{
"cookies": [
{
"name": "session-username",
"value": "standard_user",
"domain": "www.saucedemo.com",
"path": "/",
"expires": 1729532645,
"httpOnly": false,
"secure": false,
"sameSite": "Lax"
}
],
"origins": [
{
"origin": "https://www.saucedemo.com",
"localStorage": [
{
"name": "backtrace-guid",
"value": "d3575904-a4dc-4139-a1a0-01f25a69e5c4"
},
{
"name": "backtrace-last-active",
"value": "1729532012509"
}
]
}
]
}
crawlerStorageState: 'auth.json'
into playbot.config.json
file....
const config = {
...
crawlerStorageState: 'auth.json',
...
};
...
Troubleshooting: you can easily test your auth.json
is created properly by running: npx playwright codegen --load-storage=auth.json [you-web-app]
and you should be logged in.
If you need to modify behavior use requirements.md
file to instruct behavior of generation of outputs. Example:
# important requirements
- use emojis to generate name of scenarios and user stories
- use priority A, B, C for business prioritization where A is most important
- generate all tests into one file
npm run dev -- crawl https://dronjo.wopee.io
npm run dev -- stories
npm run dev -- tests
npm run dev -- code
We welcome contributions! Please follow these steps:
git checkout -b feature/your-feature-name
git commit -m 'Add some feature'
git push origin feature/your-feature-name
For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under a Proprietary License. For more details, refer to the LICENSE file.
FAQs
PlayBot is an AI-powered CLI tool designed to accelerate the development and maintenance of Playwright test automation.
The npm package playwright-ai-bot receives a total of 0 weekly downloads. As such, playwright-ai-bot popularity was classified as not popular.
We found that playwright-ai-bot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.