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

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

php - How can I merge Nodes & Webform Submissions into instances of one general Content Type in Drupal 6? -

xslt - Umbraco and EXSLT sets do not work -