Playwright Setup | Bondar Academy
Course: Playwright API Testing with TypeScript
Module: Introduction
Instructor: Artem Bondar
Lesson Summary
In this lesson, we will install the Playwright Framework from scratch. Follow these steps to set up your project: Step 1: Create a Project Folder Create an empty folder on your computer where you want to install your project. For this demonstration, we created a folder named pwapi-testing on the desktop. You can choose any location you prefer. Step 2: Open the Folder in Visual Studio Code Open Visual Studio Code. Click on File and select Open Folder . Choose the pwapi-testing folder. Enable Auto Save in the settings. Step 3: Install Playwright Refer to the Playwright documentation for installation. Execute the following command in the terminal: npm init playwright@latest Answer the configuration questions: Select TypeScript for the programming language. Accept the default test folder. Keep GitHub Actions as false . Install Playwright browsers as true . Step 4: Review Project Structure After installation, the following files and folders are created: playwright-config.ts - Main configuration file. package.json - Node.js project configuration. gitignore - Specifies files to ignore in version control. test folder - Contains example test files. node_modules - Automatically generated folder for dependencies. Step 5: Run Tests To ensure everything is working, run the following command: npx playwright test This will execute the tests across different browsers. You may see multiple tests due to the configuration settings. In the next lesson, we will modify this setup for API testing using the Playwright framework.