Also forgot to mention in my previous post, what I've found in my testing on desktop browsers, is that if what you're testing is on same page/screen as where you've cleared local storage and whatever was "cached" by that was displayed on screen before you cleared the local storage, you then have to "refresh" the page/screen for it to take effect. Don't expect clearing it with javascript only and see a sudden update in the UI (unless it was built that way in the app to auto-update on change of local storage).
And local storage only applies to pages/screens where they're used, it's not necessarily a site-wide/domain-wide thing, so you may have to clear it in the correct location (page/screen) where it's used, not at some other screen/page at the end of the test. It's different from cookies (which are domain based) in that respect. At least that's the case for testing on desktop for our web app.