Code Monkey home page Code Monkey logo

Comments (8)

phortx avatar phortx commented on August 11, 2024 1

I've managed to fix the issue with homebrew. Also browsers-api is a nice solution, which I didn't know :) thanks for your help. I will close this issue for now as long as I'm the only one who has this kind of problem and this is hopefully solved right now.

Thanks for your time and work on this project, really appreciate :)

from wallaby.

mhanberg avatar mhanberg commented on August 11, 2024

I don't think it's currently possible, but can probably be made possible. The selenium driver allows this.

The one thing you'd have to worry about tho is concurrency, its pretty easy to overload a single chromedriver instance, which is why Wallaby starts a pool of them.

With that docker-compose setup, might be easy to start a few and then pass the driver all the URLs and basically have the same pooling mechanism over the URL rather than the chromedriver instances.

from wallaby.

phortx avatar phortx commented on August 11, 2024

Ah good point!

I wonder, how do other libraries like wallaby handle this issue? I had never version issues with rubys capybara for example 🤔

from wallaby.

mhanberg avatar mhanberg commented on August 11, 2024

It's been 4+ years since I've used capybara but as far as I know it only runs one test at a time

from wallaby.

phortx avatar phortx commented on August 11, 2024

Good point. I wonder, what the best solution might be. The core problem is that it is difficult to keep chrome and chromedriver in the same version. Especially when there are bugs in the package management of the OS or chrome update package is available before chromedriver update package and so on.

My first idea was to use a docker container, but there is no official chromedriver image and concurrency might be an issue as you pointed out, so this doesn't feel very clean.

Another approach would be to make wallaby manage it's on chromedriver installation like this:

  • Check wether chrome is installed (an abort if not)
  • Check wether chromedriver is installed and version is the same (if yes: fine)
  • If not, automatically download the chromedriver binary matching the installed chrome version and use this binary

How do you feel about this idea, Mitchell?

from wallaby.

mhanberg avatar mhanberg commented on August 11, 2024

are you having trouble geting the right version locally or in CI?

if its local, I think my suggestion would be to write a script that does something similar to what you described, get version of installed chrome, then download the correct chromedriver version

from wallaby.

phortx avatar phortx commented on August 11, 2024

I have this problem locally. For GitLab CI, I will build a custom docker image with (hopefully) correct chrome and chromedriver version preinstalled.

A local script would be a workaround, yes. But I think others may have this kind of issue too and it would be very comfortable when wallaby handles this on it's own :)

from wallaby.

mhanberg avatar mhanberg commented on August 11, 2024

A better option actually is to use the puppeteer/browsers cli that allows you to install any and exact versions of Firefox and Chrome

https://pptr.dev/browsers-api

You could easily configure wallaby to use chrome and chromedriver from a specific path (a gitignored directory in your project dir, or a global cache dir) and then install them with that.

I think having Wallaby manage and install the browser/webdriver is a whole can of worms that would take a lot of thought, so if there are easy ways to accomplish something similar then I'd rather do that first.

If we were to pursue a wallaby-managed solution, i think I'd rather build something akin to the tailwind/esbuild libraries.

from wallaby.

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.