← Back to Discord Forum

Question about Storage State and browser.newContext()

I now have Storage State saved and working so my admin user only ever logs in through the UI once using the log in form.

Now, using the admin user, I am creating a new user for my test. Then using browser in my test fixture, I create a new browser context and then open a new page from that browser context.

I then want to use that new page to log in as my new user.

The problem I am having is that my new browserContext and page are still under the influence of my Storage State which stops my new user from logging in through the UI. In fact, it loads straight into my app and is logged is as 'admin'.

Is there anyway I can get that new browserContext and page to be FULLY isolated so that it is not affected by the Storage State?

This thread is trying to answer question "Is there any way to fully isolate a new browser context and page from the storage state?"

0 replies
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.