Closed thewatts closed 10 years ago
Yes. We don't directly access app session (it's not even possible for JS cabybara drivers selenium, webkit, ...). Getting/Setting rack session is done via GET/PUT request to middleware app injected in to your application. So that page.current_url changes. Nothing wrong here.
scenario 'Visit page after ordering' do shop_id = page.get_rack_session_key(:current_shop_id) # current_url is http://www.example.com/rack_session.raw visit shop_path(shop_id) # current_url is http://www.example.com/shops/:id next_shop_id = page.get_rack_session_key(:next_shop_id) # current_url is http://www.example.com/rack_session.raw ... end
Cool! Thanks :)
And thanks for this excellent gem!
Trying to pull data via the url (parameter information), and then work the with data to find objects in the database.
However, when I call
page.get_rack_session_key(current_order_key)
, the value forpage.current_url
changes fromhttp://www.example.com/:restaurant_slug
tohttp://www.example.com/rack_session.raw
= preventing me from then working with the URL.Am I doing something wrong?
Thanks!