Code Monkey home page Code Monkey logo

Comments (6)

jonhoo avatar jonhoo commented on May 24, 2024 1

What you're looking for is a browser than can run in "headless" mode. phantomjs is a relatively common tool for that. Google Chrome also now has support for --headless , and Firefox is getting it too in not too long. They both need you to run a "driver" for automation though. Chrome's is called chromedrive, and Firefox's is called geckodriver. I've had some issues getting the Chrome --headless flag to run correctly though, so another workaround (on Linux) is to use xvfb-run. That will spawn the browser window on a fake X screen, which causes nothing to appear.

from fantoccini.

jonhoo avatar jonhoo commented on May 24, 2024

That depends on your requirements for "production ready". It has not been used in production anywhere as far as I know, though I've been using it myself for a couple of smaller projects. I don't think there are any major instabilities or known defects at the moment, though deploying it in a larger environment is the only way to find out.

from fantoccini.

kokinarido avatar kokinarido commented on May 24, 2024

Ok. Is there a way to run it on a server, that is, without a physical display?

from fantoccini.

kokinarido avatar kokinarido commented on May 24, 2024

yeah, but what about a rust library for xvfb-run? or can that a shell script, for example? for python I had to use a library in python for xvfb

from fantoccini.

jonhoo avatar jonhoo commented on May 24, 2024

I'm not sure what you're asking? xvfb-run is a command-line tool. So you would run, say:

$ xvfb-run chromedriver --port=4444

That could also go in a shell script (just use & to make it run in the background). You can also launch it from Rust by using std::process::Command.

from fantoccini.

kokinarido avatar kokinarido commented on May 24, 2024

thanks

from fantoccini.

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.