localStorage persists after evaluating localStorage.clear();

492 views
Skip to first unread message

Juan Carlos Alonso

unread,
May 3, 2013, 4:38:14 PM5/3/13
to casp...@googlegroups.com
I'm having this weird issue, when my app performs a login and adds data to the localStorage, the next time I run the tests the data is still there, I tried performing  a:

casper.evaluate(function() {
    localStorage.clear();
}, {});

But the values are not erased. This only happens with keys created by the app. if try to reset the value of the keys they won't change.

If I create different keys I can set and reset the value with no problem.

Any ideas what is happening?




Nicolas Perriault

unread,
May 4, 2013, 5:38:16 AM5/4/13
to casp...@googlegroups.com
On Fri, May 3, 2013 at 10:38 PM, Juan Carlos Alonso
<lh2ol...@gmail.com> wrote:

> If I create different keys I can set and reset the value with no problem.
>
> Any ideas what is happening?

Is it working with plain phantomjs?

- if not, please file an issue on their bugtracker
- if so, please try to write a minimal reproducible test case and file
an issue on the casperjs bugtracker

Thanks

--
Nicolas Perriault
https://nicolas.perriault.net/
Phone: +33 (0) 660 92 08 67
Reply all
Reply to author
Forward
0 new messages