Reputation: 121
I executed acceptence test with using capybara + poltergeist + phantomjs.
My test environment like this
phantomjs: stable 2.1.1
capybara (2.15.1)
poltergeist (1.13.0)
I simulated the browser back button in Capybara like this code.
step 'I go back to previous page' do
page.go_back
end
Actually,I could simulate the browser back in Capybara.
but The behaviors of actual manipulation by browser(Safari/Chrome/Firefox) and PhantomJS were different.
When I pushed browser back button by actual browser, the previous page is not reload because any request are not send to my server.
In the case of this case, Back forward cache is enabled.
On the other hands in the case of using phantomjs, http request is send to server. so previous page is reloaded and refreshed.
I think if I can enable the back forward cache in PhantomJS, The behaviors of actual manipulation by browser(Safari/Chrome/Firefox) and PhantomJS may be same.
firstly, PhantomJS has back forward cache?
please give me any hint and idea.
thanks.
Upvotes: 1
Views: 107