Skip to content

Latest commit

 

History

History
85 lines (60 loc) · 3.35 KB

Installation.md

File metadata and controls

85 lines (60 loc) · 3.35 KB

Prerequisites

Ensure you have the following software installed on your machine:

  • npm (v8.0.0 or later): Package manager for JavaScript, used to install and manage software packages.
    • To verify your current version, use the command npm -v.
    • If npm isn't installed, follow the npm installation guide.
  • Node.js (v16.0.0 or later): JavaScript runtime built on Chrome's V8 JavaScript engine, allowing the execution of JavaScript server-side.
    • To verify your current version, use the command node -v.
  • Git: Distributed version control system used to track changes in source code during software development.
    • To check if Git is installed, run the command git --version.
    • If Git isn't installed, download and install it from the official Git website.
  • VSCode Plugins:
  • VSCode Settings: To ensure consistency with the prettier format settings, apply the following configurations in your VSCode settings (use Cmd + , to access settings):
    • Quote Style: Set typescript.preferences.quoteStyle to single for consistent quote usage across your code.
    • Format On Save: Enable Format On Save Mode and set it to file. This ensures your code is automatically formatted every time you save, enhancing readability and consistency.

Installation

  1. Clone the repository:
git clone https://github.com/vasu31dev/playwright-ts.git
  1. Navigate to the project directory:
cd playwright-ts
  1. Install the dependencies:
npm install
  1. Install the Playwright browsers
npx playwright install
  1. (Optional) Git User setup for the first time. If you are a code/test contributor, set up your user in GIT using the commands:

    git config user.email "<your-email>"
    git config user.name "<your-name>"
    git remote set-url origin https://USERNAME:[email protected]/vasu31dev/playwright-ts.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.

Project Update Guide

To pull the latest changes and install the latest packages, follow these steps:

  1. Pull the latest changes
git pull origin <branchName>

Replace <branchName> with the name of the branch that you want to update.

  1. Install the latest packages
npm install
  1. 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
  1. Update Playwright browsers as needed
npx playwright install