0:00 Introduction
1:14 What is Playwright?
3:43 System Requirements
5:50 How to check if Python is installed
6:40 Download & Install Python
10:25 Check Python Environment Variables
12:26 Install Playwright
13:08 Create Virtual Environment for Project
17:09 Activate Virtual Environment
18:09 Install Playwright (pip)
20:25 Install Browser Binaries
22:04 How to use an IDE (VS Code)
23:53 Download & Install VS Code
28:16 Create First Playwright Test File
30:46 Write the Code
34:59 Code Formatting
38:09 Understanding the Code
40:42 Run the Test
In this session…
Getting Started
Install Python
Install Playwright
1st Playwright Test
(Open a webpage)
After watching take this QUIZ and let me know your score in comments
https://forms.gle/W3GUVGskMDFA3G29A
GitHub Repo - https://github.com/Raghav-Pal/Playwri...
--
What is Playwright
It’s a tool to test websites from start to end (like how a user uses it)
--
What browsers does it work with?
Works with all big browsers:
Chromium (like Chrome, Edge)
WebKit (like Safari)
Firefox
--
What OS does it work with?
Windows
Linux
Mac
Can run tests in CI/CD ( Jenkins etc.)
headless (no browser window) OR headed (you see browser open)
can also pretend to be a mobile phone (mobile emulation)
--
Before we begin… Let’s check our system is ready
At least 4 GB RAM (8 GB better)
Disk space: around 1.5 GB
Stable internet
https://playwright.dev/python/docs/in...
-
Install Python
Step 1 - Check if python is already installed python --version or py --version
Step 2 - Download Python installer from https://www.python.org/
Step 3 - Create a folder for python
Step 4 - Run python installer and use the folder destination
Step 4 - Also check if PATH env variables has python and python/scripts folders added
Step 5 - Check if python is installed python --version or py --version
Step 6 - Also check pip pip --version
-
Install Playwright
Step 1 - Create a new folder for playwright project
mkdir playwright_demo
cd playwright_demo
Step 2 - Create a python virtual env for this project
python -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
Step 3 - Install playwright pip install playwright playwright --version
Can also install with pytest pip install pytest-playwright
Step 4 - Install browser binaries
playwright install
This downloads Chromium, Firefox, WebKit for testing
Step 5 - Verify installation
python -m playwright --version
We’re ready. Let’s write our first script
-
1st Playwright Test (Open a webpage)
Step 1 - Create a new python file touch first_test.py # Mac/Linux
type nul > first_test.py # Windows
Step 2 - Write this script in first_test.py
Can also use some editor or IDE like VS Code
Can download zip file of vscode and extract in a separate new folder
Can also install python extensions. Will find python option in the button status bar
Step 3 - Run the test python first_test.py
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
page = browser.new_page()
page.goto('https://google.com')
print(page.title())
browser.close()
-
#Playwright #PythonAutomation #QATutorial
▬▬▬▬▬▬▬
Share with all who may need this
If my work has helped you, consider helping any animal near you, in any way you can
Never Stop Learning
Raghav Pal
▬▬▬▬ USEFUL LINKS ▬▬▬▬
✅ ALL TUTORIALS - https://AutomationStepByStep.com/
🙌 Connect with Raghav:
Ask Raghav: https://bit.ly/2CoJGWf
GitHub: https://github.com/Raghav-Pal
Udemy: https://www.udemy.com/user/raghav-pal-3/
Shorts Eng - https://bit.ly/3H9bifV
Shorts Hindi - https://bit.ly/3XY7XqN
➡️ Subscribe for more videos: / @raghavpal
—
Auf dieser Seite können Sie das Online-Video Playwright Python 1 | Getting Started mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Automation Step by Step 05 Juni 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 117,917 Mal angesehen und es wurde von 1.2 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!