Playwright VS Code Extension

Profile picture for user arilio666

In this article, we will see how we can make our tests on playwright faster and more versatile using certain VS Code extensions. This will speed up the process of writing automation tests and our test executions.

Playwright Extensions

Go to the VS Code extension tab and search and install below 3 plugins:

  1. Playwright Test Snippets (Mark Skelton)
  2. Playwright Test for VSCode (Microsoft)
  3. Playwright Runner (Koushik Chatterjee)
Playwright Extension

1. Playwright Test Snippets

This extension is beneficial if you want to write describe, test and others blocks. After installation, create a test file. Type in pw and hit on control+space.

Playwright Test Snippets

You will get autosuggestions for creating test blocks, descriptions, etc.

2. Playwright Test for VSCode

This extension is handy in the running test from the test runner record, run, and view our tests in the test runner.

Playwright Test for VSCode

3. Playwright Runner

This extension will lead to a "execute playwright test" under test step.

Playwright Runner Extension

Clicking this will trigger the test block and execute the playwright test.