Search code examples
typescriptplaywright

beforeSession in playwright


I want to delete certain folder and file (allure-results folder)in the test directory before starting the test in playwright. WebdriverIO provide the options like beforeSession , i want to know is there any similar option available in playwright or how we can execute some code before starting the tests.


Solution

  • i found the solution for this ,in playwright keep the code under globalSetup function and that will be executed first