Giter Site home page Giter Site logo

Comments (4)

adrian-herscu avatar adrian-herscu commented on August 20, 2024

Digged a bit and found commands.properties:

command.chrome.linux.01=google-chrome --version

this is loaded in VersionDetector and somewhere prepended with /usr/bin.

This should be customizable.

Any suggestion about how to override the default behavior?

from webdrivermanager.

bonigarcia avatar bonigarcia commented on August 20, 2024

You can use the method browserVersionDetectionCommand() to use a custom path for your browser

WebDriverManager.chromedriver().browserVersionDetectionCommand("/path/to/browser --version").setup();

See example.

from webdrivermanager.

adrian-herscu avatar adrian-herscu commented on August 20, 2024

Followed your suggestion and added somewhere in my code:

                    webDriverManager.browserVersionDetectionCommand(
                        "flatpak run com.google.Chrome");

Tested it in a bash shell as flatpak run com.google.Chrome --version
and it returns:

[0607/232449.452209:WARNING:chrome_main_linux.cc(80)] Read channel stable from /app/extra/CHROME_VERSION_EXTRA
Google Chrome 125.0.6422.141 

Didn't work :( The logs:

WebDriverManager - Using WebDriverManager 5.7.0
Shell - Running command on the shell: ['flatpak run, com.google.Chrome']
Shell - There was a problem executing command <flatpak run com.google.Chrome> on the shell: Cannot run program "flatpak run" (in directory "."): error=2, No such file or directory

from webdrivermanager.

bonigarcia avatar bonigarcia commented on August 20, 2024

I believe the command should contain the --version:

webDriverManager.browserVersionDetectionCommand("flatpak run com.google.Chrome --version");

from webdrivermanager.

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.