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

Looks like capybara is only being used to download the initial page #2

Open
jeffdeville opened this issue May 17, 2015 · 0 comments
Open

Comments

@jeffdeville
Copy link

In capybara, when you call .visit, you essentially navigate to that page in the driver. From here, you can interact with it with capybara's functionality (find, click etc). But it looks like you're calling .html, and piping it into Nokogiri, which separates you from Capybara at that point. So you can't then interact with that page (follow links while preserving cookies, trigger events that may involve javascript, etc).

So what you have is better than downloading w/ RestClient in that initial page-load javascripts will run, but nothing else after that will.

I'd recommend exposing the session as the primary underlying element, and the xpath/css selectors to interact with that. From there, I'd suggest sharing the session across pages, so that cookies can be preserved (so you can log in to sites, for example).

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

1 participant