Read more

Reload the page in your Cucumber features

Arne Hartherz
September 28, 2010Software engineer at makandra GmbH

Both these approaches will keep your GET parameters -- and will only work for GET requests.

  • Capybara:

    When /^I reload the page$/ do
      visit [ current_path, page.driver.request.env['QUERY_STRING'] ].reject(&:blank?).join('?')
    end
    
  • Webrat:

    When /^I reload the page$/ do
      visit url_for(request.params)
    end
    
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

For a step that distinguishes between drivers (Selenium, Rack::Test, Culerity), check n4k3d.com Show archive.org snapshot .

Posted by Arne Hartherz to makandra dev (2010-09-28 11:55)