Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating rack session fails in Firefox #35

Open
rosemichaele opened this issue Mar 25, 2020 · 1 comment
Open

Updating rack session fails in Firefox #35

rosemichaele opened this issue Mar 25, 2020 · 1 comment

Comments

@rosemichaele
Copy link

rosemichaele commented Mar 25, 2020

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
@ayanko
Copy link
Member

ayanko commented Apr 21, 2020

native does not work for rack_test driver. Actually fill_in is pretty base helper in capybara and I wonder why it "does not" work for FF now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants