
Add method to simulate browser back button
Reported by bendycode | October 9th, 2008 @ 08:01 PM
Would it be possible to add a "click_back_button()" method to webrat?
I'd like to add some cucumber tests to applications I'm coding that would let me specify very abstractly what should happen when the user returns to certain pages by clicking the browser back button.
If this is already possible to simulate, I'd love to hear how.
Thanks!
Comments and changes to this ticket
-
Bryan Helmkamp October 21st, 2008 @ 11:38 PM
Stephen,
Does "redirect_to :back" get you what you need? If not, what behavior about it is not right?
Thanks,
-Bryan
-
Bryan Helmkamp October 25th, 2008 @ 05:02 PM
- State changed from new to hold
-
Ingo June 10th, 2009 @ 09:04 AM
Hi I am having the same problem (provided I understand bendycode correctly), and 'redirect_to :back' does not seem to work for me. Basically, I would like to implement the following cucumber step:
When I go back
-
Ingo June 10th, 2009 @ 09:09 AM
This worked for me:
When(/^I go back$/) do
visit request.env['HTTP_REFERER'] end
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.