mcdcorp / opentest

Open source test automation tool for web applications, mobile apps and APIs
https://getopentest.org
MIT License
447 stars 107 forks source link

How to set the binary path of chrome in the actor.yaml? #576

Open TripleG opened 2 years ago

TripleG commented 2 years ago

What is the keyword for setting chrome binary path in the chromeOptions section in actor.yaml?

 desiredCapabilities:
        browserName: chrome
        chromeOptions:
            args: [ --start-maximized ]

I.e. what is the equivalent of


options.setBinary("/path/to/other/chrome/binary");
adrianth commented 2 years ago

You can do that by using the selenium.chromeBinaryExePath parameter. For example, if you wanted to run a test with Chromium instead of Chrome, you'd do this:

selenium:
    desiredCapabilities:
        browserName: chrome
    chromeBinaryExePath: C:\Chromium\Chromium103.exe
    chromeDriverExePath: C:\Selenium\chromedriver.exe

The selenium.chromeBinaryExePath parameter tells the test actor to run the "setBinary" method that you mentioned above. You can examine the code here.

TripleG commented 2 years ago

It is working, thanks!