I started using Playwright in MSTest and I have my test class implement the base PageTest class.
One thing I am wondering: Is the instance of the injected Page object gets reset on every TestMethod?
I tried to log the Page.URL on every TestMethod and the first one got it correctly (set via the overridden ContextOptions) but the succeeding logs shows null. And when I took a screenshot inside the TestMethods, the first one shows my full page but the next ones are empty.
Is this expected behavior? Does it mean I have to visit and login again on the site I am testing on every TestMethods that I have?
I am coming from Cypress and each test function inside the spec file shares the same context of the page. So I am wondering if I setup something wrong or is this expected behavior.