Creates python script from a recorded browser session. This script can be ran to playback the action in a non-headless/headless browser window.
This Bash script facilitates the generation of Playwright scripts for web automation by interacting with the Playwright CLI. The script prompts the user for input to customize the script and organizes the generated scripts into a designated folder.
Before using the script, make sure you have the Playwright CLI installed.
pip install playwright
or alternatively install the requirements.txt dependencies
pip install -r requirements.txt
Lastly,
chmod +x auto_browser.sh
-
Run the Script:
./auto_browser.sh
-
Follow the Prompts:
- The script will prompt you to enter a name for the generated script.
-
Generated Script:
- The script creates a folder named
Generated_Scripts
to organize the output. - Inside this folder, a subfolder is created with the specified script name.
- The generated Playwright script, targeting Python, is saved in this subfolder.
- The script creates a folder named
- Ensure that the Playwright CLI is installed on your system before running the script.