I want to be able to login and then visit my profile page to scrape some information. The login works perfectly but when i visit the profile page it doesn't display it correctly and im asked to login again. Like as if a cookie wasn't set or session wasn't created. How can I do this?
I'll also mention, the site relies heavily on frames and Javascript, it doesn't work with mechanize for example.
require 'capybara-webkit'
require 'capybara/dsl'
require 'nokogiri'
include Capybara::DSL
Capybara.current_driver = :webkit_debug
Capybara.app_host = "https://site.com"
login = '/start.asp'
target = '/profile'
visit(login)
fill_in('user', :with => 'user)
fill_in('pass', :with => 'pass')
my_link = find(:xpath, '//*[@id="loginform"]/div/div[2]')
my_link.click
visit(target)