Playwright Annotations

In this article, we will be seeing playwright annotations. Annotations can be conditional, which means they can be applied to a single test or multiple tests. Multiple annotations on the same test are possible with also various settings too.


  • With this, the specified test step will be skipped.
  • Use this annotation when the test step is not relevant.
test.skip('skip this test', async ({ page }) => {

  • This annotation will make the test step fail and execute to confirm that this test fails.
  • The playwright complains if the test does not fail.
test('login', async ({ page }) => {;


  • When the test is slow or crashes, use fixme to let know that this is a failed step.
test.fixme('test to fix', async ({ page }) => {
 // ...


  • This annotation is used to classify the test as sluggish and exceeds the test timeout.
test('slow', async ({ page }) => {


  • This will only run the particular specified test step.
test.only('this test alone', async ({ page }) => {
 // only this test.
Fri, 12/16/2022 - 13:56
Ashwin possesses over five years of experience in the Quality Assurance industry and is currently serving as a Technical Lead at iVagus. His expertise encompasses a broad range of technologies, including Cypress, Rest Assured, Selenium, Cucumber, JavaScript and TypeScript.