This repository contains a Python script that demonstrates how to use Playwright to automate browser actions, such as navigating to a website, performing a search, clicking a link, and taking a screenshot.
Before running the script, ensure you have the following prerequisites installed:
- Python 3.7 or later
pip
(Python package manager)
- Clone this repository to your local machine:
git clone https://github.com/capsen/introduce_python.git
- Navigate to the cloned repository directory:
cd introduce_python
- Install the required Python packages using pip:
pip install playwright
- Install browser dependencies for Playwright:
python -m playwright install
- Ensure you are in the repository directory where the Python script (script.py) is located.
- Run the Python script:
python browser_automation.py