Skip to content

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

@jeffdeville

Description

@jeffdeville

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).

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