This is the repository for the LinkedIn Learning course "Playwright Design Patterns" The full course is available from LinkedIn Learning.
In this course, learn how to leverage design patterns to enhance your test automation framework using Playwright. By understanding and implementing patterns such as the Page Object Model, fixtures, and data-driven testing, you'll be able to write cleaner, more maintainable, and scalable test scripts. This course is designed for test automation engineers and developers who want to improve their testing skills and ensure their tests are robust and easy to maintain. Through practical examples and hands-on exercises, gain the knowledge and skills needed to apply these design patterns effectively in your projects.
See the readme file in the main branch for updated instructions and information.
This repository has branches for each of the videos in the course. You can use the branch dropdown menu in GitHub to switch to a specific branch and take a look at the course at that stage, or you can add /tree/BRANCH_NAME
to the URL to go directly to the branch you want to access.
The branches are structured to correspond to the videos in the course. The naming convention is as follows:
CHAPTER#_MOVIE#
For example, the branch named 02_03
corresponds to the second chapter and the third video in that chapter.
In some cases, branches will have both a beginning and an end state. These are marked with:
b
for "beginning" (e.g.,02_03_b
)e
for "end" (e.g.,02_03_e
)
The b
branch contains the code as it is at the beginning of the movie, while the e
branch shows the state at the end. The main
branch holds the final state of the code as it is at the conclusion of the course.
Note: When switching from one exercise files branch to the next after making changes, you may encounter the following error:
error: Your local changes to the following files would be overwritten by checkout: [files]
Please commit your changes or stash them before you switch branches.
Aborting
To resolve this issue:
- Add changes to git using:
git add .
- Commit changes using:
git commit -m "some message"
-
To use these exercise files, ensure you have the following installed:
- Node.js (latest LTS version recommended)
- Other dependencies as listed in the
package.json
file can be installed usingnpm install
-
Clone this repository into your local machine using the terminal (Mac), CMD (Windows), or a GUI tool like SourceTree:
git clone https://github.com/LinkedInLearning/playwright-design-patterns-2019019/tree/main
-
Navigate to a specific branch corresponding to the lesson you are working on:
git checkout BRANCH_NAME
-
Install the dependencies:
npm install
-
Follow any additional course-specific instructions found in the relevant branches.
Qambar Raza
Playwright Test Automation Specialist, Content Creator
Check out my other courses on LinkedIn Learning.