Git Product home page Git Product logo

Comments (12)

route avatar route commented on June 5, 2024 1

Got it, I'll check then.

from ferrum.

route avatar route commented on June 5, 2024 1

It's not my top priority but it works, so I don't know what is not working:

require "ferrum"

browser = Ferrum::Browser.new(ws_url: "wss://chrome.browserless.io?token=xxx")
browser.version
page = browser.create_page
page.go "http://example.com"
page.screenshot(path: "a.png")
sleep 5
browser.quit

from ferrum.

Fodoj avatar Fodoj commented on June 5, 2024 1

As of my knowledge, browserless.io SaaS doesn't offer browserless 2.0 yet.

from ferrum.

Fodoj avatar Fodoj commented on June 5, 2024 1

Just fyi, from Browserless support. In my case I was testing with local containers, not with the cloud offering.

Bildschirmfoto 2024-02-22 um 16 32 32

from ferrum.

Aubermean avatar Aubermean commented on June 5, 2024 1

I figured out that Ferrum is stripping the query params, and in a newer version of ferrum that added ws support without a url, it is obtaining the ws_url from /json/version which incorrectly sets ws_url to 0.0.0.0:3000 :)

I am in the process of submitting a PR that fixes this

from ferrum.

route avatar route commented on June 5, 2024

It's described here and works https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing#dockerizing-system-tests

from ferrum.

Fodoj avatar Fodoj commented on June 5, 2024

I have this setup already working. The article was written in 2020, Browserless 2.0 was released in December 2023. Browserless 1.x works without any issues, but new one works as describe in the issue above.

from ferrum.

Fodoj avatar Fodoj commented on June 5, 2024

See also: https://github.com/browserless/browserless/blob/main/MIGRATION-2.0.md#browserless-20-migration-guide

from ferrum.

Aubermean avatar Aubermean commented on June 5, 2024

Did you ever manage to get it working or find out what the issue was? @Fodoj

from ferrum.

route avatar route commented on June 5, 2024

As of my knowledge, browserless.io SaaS doesn't offer browserless 2.0 yet.

Ah I see now. That's why it working. Then I need more tests and check out the PR

from ferrum.

Fodoj avatar Fodoj commented on June 5, 2024

@route try with production-sfo.browserless.io endpoint, per their support this one is backed by v2 (or just local container)

from ferrum.

route avatar route commented on June 5, 2024

Fixed in master

from ferrum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.