I'm migrating from Cypress, and have grown accustomed to being able to open the browser dev tools and view what my app stores in local storage after my tests run. It seems that in Playwright this ability is lost, as the browser (chromium) devtools just show the local storage for Playwright, and not my application. Is there any way to inspect local storage / state within a test in UI mode?
This thread is trying to answer question "Is there any way to inspect local storage or state within a test in UI mode in Playwright?"
Worse case, might suggest registering an 'afterEach' and log out the localSettings. Might be a better way but assuming you more interested in being able to view it.... I believe that shuld work, even better make it a generic routine to simply say "DumpLocalStorage()" anytime...? Might even add it to the beforeAll() as well? But main thing is being able to view it?
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 [email protected].