ruby on rails - How can I simulate the browser back button in Capybara? -


we have issue on our e-commerce site users hit "checkout" twice , have card charged twice.

it's common enough bug , easy fix, i'd test solution in our capybara setup. once i've called click_button('checkout'), possible me pretend i'm user hitting browsers button , call click_button('checkout') second time?

you may want try:

when(/^i go back$/)   page.evaluate_script('window.history.back()') end 

this require running senario in javascript capable driver (selenium/celerity/akephalos)


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -