Here is my scenario:
testfile1 containing some tests testfile2 containing some tests ... testfileN containing some tests
- I log into application in global-setup (using storageState as defined in docs - https://playwright.dev/docs/test-global-setup-teardown#example)
- Executing testfile1...testfileN with this logged session
- Now I would like to logout user from application after last executed test, however I have tests grouped into few test suites, so need some generic way to logout after last test, can't add logout method just after some specific test.
I tried to use globalTeardown, however I can't find a way to send open page to teardown and execute logout. Is it even possible or should I use some other method for this scenario?