- Clone the repository:
git clone https://github.com/vasu31dev/playwright-ts-template.git
- Navigate to the project directory:
cd playwright-ts-template
- Install the dependencies:
npm install
- Install the Playwright browsers
npx playwright install
-
(Optional) Git User setup for the first time. If you are a code/test contributor, set up your user in GIT using the below commands:
git config user.email "<your-email>" git config user.name "<your-name>" git remote set-url origin https://USERNAME:SECRETTOKEN@github.com/vasu31dev/playwright-ts-template.git
Replace
<USERNAME>
with your GitHub username and<SECRETTOKEN>
with your GitHub personal access token. If you don't have a personal access token, you can create one in your GitHub account settings following this GitHub guide.
To pull the latest changes and install the latest packages, follow these steps:
- Pull the latest changes
git pull origin <branchName>
Replace <branchName>
with the name of the branch that you want to update.
- Install the latest packages
npm install
- If there are dependency errors while installing packages, you can remove the
node_modules
folder and install the packages again. This step can help resolve potential conflicts or issues with dependencies.
rm -rf node_modules
npm install
- Update Playwright browsers as needed
npx playwright install