Search code examples
cookiescasperjspage-refreshsimulate

Simulate page refresh with CasperJS


How can I simulate page refresh (F5) with CasperJS ?

I'm trying to simulate F5 because I want to test if my Cookie Manager works fine ( the first time must not set a certain cookie, the second time it must ).

Calling two times casper.start(url) doesn't work.


Solution

  • It looks like casper.reload is what you are looking for. It will use the underlying PhantomJS function page.reload.