Playwright Extensions For Visual Studio Code


This blog explains the Playwright extension which will speed up the process of writing automation tests and your test execution as well using test explorer which the extension provides.

Once you setup your playwright project in VS Code we can go ahead and search the extension in the extensions tab

Steps to download the extension

Go to extension tab in the Visual studio code

Search for the below playwright extension

  • Playwright Test Snippets
  • Playwright Test for VSCode
  • Playwright Runner

Playwright extension

Once you find these extensions in your extensions tab, go ahead and download the extension one by one in your IDE.

Playwright Test Snippets

This extension will be helpful for testers to write the describe and test blocks.

Once this extension is installed go ahead and create a test file.

type in pw- and hit ctrl+space

You will get the autosuggestions, for creation of describe, test block ..etc. You can choose the respective option and you will have a boiler plate snippets added to your test file.

Playwright Test Snippets

Playwright Test for VSCode

This extension is from Microsoft and it provides many easy ways to record tests, run your tests and view results in your test explorer.

We can run the tests using the test explorer.

We can also run the tests using the green arrow present by the side of your describe and test blocks.

If you click double green right arrow present by the side of the describe block, then all the test blocks inside the describe block will get executed.

If you click the single green right arrow present by the side of the describe block, then that specific test alone will get executed.

Playwright Test for VSCode

Playwright Runner

This extension is also used to run the playwright test but the difference is while running the tests using this extension you can execute the corresponding playwright cli command which gets invoked in the terminal

Click the execute playwright test button above the test block to execute the playwright test

Playwright Runner




Hope this blog will be helpful when you are writing playwright automation test.


Happy Learning.........