Skip to content

Updating rack session fails in Firefox  #35

@rosemichaele

Description

@rosemichaele

I am trying to use this gem while testing Firefox through a remote selenium webdriver session, and am having problems with the Capybara step that fills in the session hash on the rack session edit screen. See what's going in the first 30 seconds of this test recording:

https://automate.browserstack.com/builds/dc63e64abd1dd845e696780be5060e7ce4474bca/sessions/a2617f6ad2ba5bc1bb2d863a2c53f34709813f7a?auth_token=230388c501523ccc9d4f62d3bb17b1ba0d6bfdb11daaa3b8dcb36f1f7dd9bd25

I was able to work around the issue by replacing the fill_in method as below in lib/rack_session_access/capybara.rb. There may be a more concise way of writing this. Happy to open a pull request if it passes the 👀test.

def set_rack_session(hash)
  data = ::RackSessionAccess.encode(hash)

  visit ::RackSessionAccess.edit_path
  has_content?("Update rack session")
  fill_in "data", :with => data
  click_button "Update"
  has_content?("Rack session data")
end
def set_rack_session(hash)
  data = ::RackSessionAccess.encode(hash)

  visit ::RackSessionAccess.edit_path
  has_content?("Update rack session")
  textarea = find_field('data')
  textarea.native.clear
  textarea.send_keys(data)
  click_button "Update"
  has_content?("Rack session data")
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions