Perform following steps to start,
- Create a new folder
- Open terminal in that folder
- Enter command "npm init playwright@latest"
- Go through the selection as required
- Remember to choose TypeScript when presented
- Open VScode
- Remove test example folder
- Remove example spec file
- Update the playwright configuration file
- base URL
- project
- headless
- Create a new test.spec.ts file inside the tests folder (if tests folder is selected)
- Start the spec file with import
- import {test, expect} from '@playwright/test'
- Start test function with callback
test ( 'Test case name', async({ page }) => {// your test actions and assertions
})