thienphuong / playwright-with-typescript

0 stars 0 forks source link

Use codegen to generate locators #6

Open thienphuong opened 11 months ago

thienphuong commented 11 months ago

To pick a locator run the codegen command followed by the URL that you would like to pick a locator from.

npx playwright codegen https://qc.oceansmart.com/

This will open a new browser window as well as the Playwright inspector. To pick a locator first click on the 'Record' button to stop the recording. By default when you run the codegen command it will start a new recording. Once you stop the recording the 'Pick Locator' button will be available to click.

image