Record Web: Browser binaries not found

Hi,

Introduction

For my bachelor-thesis I need to compare tools for automated testing on my company’s PC.

The issue

My firefox.exe and chome.exe are not installed in the default directory. They are portable versions located on their respective custom directory.
So, when I want to start the Web Recorder, using the respective Browser, I get an Error-Message, saying that the binary can not be found.
(e.g. “cannot find Chrome binary”)

What I tried:

Adding the Web Browsers under Window -> Katalon Studio Preferences -> General -> Web Browser.

Setting Path to the binaries via cmd.exe

Unfortunately both ways did not work for me.

Additional information

  • I have no rights to install any software on my PC
  • System: Windows 7 64 Bit
  • Katalon Studio Version 5.1.0

Possible Workaround

The only way, I can use the Web recorder is by using the respective browser extension and starting the recorder through the browser. But I don’t like this way very much.

My Question

Is there any other way, I can get Katalon Studio to find the browser binaries? In other tools I recently used (Selenium, Protractor) I can set the path to binary e.g. via the browser capabilities.

I hope I was able to explain my issue with my rudimentary english skills. :slight_smile:
Thanks a lot!

2 Likes

I’m having a similar issue, so I gave you an upvote. BTW your English is fine, your explanation is very clear.

Stefan Czogalla said:

Hi,

Introduction

For my bachelor-thesis I need to compare tools for automated testing on my company’s PC.

The issue

My firefox.exe and chome.exe are not installed in the default directory. They are portable versions located on their respective custom directory.

So, when I want to start the Web Recorder, using the respective Browser, I get an Error-Message, saying that the binary can not be found.

(e.g. “cannot find Chrome binary”)

What I tried:

Adding the Web Browsers under Window -> Katalon Studio Preferences -> General -> Web Browser.

Setting Path to the binaries via cmd.exe

Unfortunately both ways did not work for me.

Additional information

  • I have no rights to install any software on my PC

  • System: Windows 7 64 Bit

  • Katalon Studio Version 5.1.0

Possible Workaround

The only way, I can use the Web recorder is by using the respective browser extension and starting the recorder through the browser. But I don’t like this way very much.

My Question

Is there any other way, I can get Katalon Studio to find the browser binaries? In other tools I recently used (Selenium, Protractor) I can set the path to binary e.g. via the browser capabilities.

I hope I was able to explain my issue with my rudimentary english skills. :slight_smile:

Thanks a lot!

Hi there,

You are doing it in a wrong location. It should be in Project -> Settings -> Execution -> Default -> WebUI -> Chrome / Firefox

And for the key to add here:
1. Chrome:
Name: chrome.binary
Value: Path to your Chrome .exe file

2. Firefox:
Name:

Name: firefox_binary
Value: Path to your Firefox .exe file

I just tried this, but it doesn’t seem to work for me…

1. Chrome:
I have chrome installed in the usual location, but it’s the wrong version (66) as I need to test with Chrome 49, when I set chrome.binary with the path to Chrome 49, it still runs the newer version.

2. Firefox:
Again I have firefox installed in the normal location (C:\Program Files (x86)\) but it’s FF45.7 (not supported?)
I set firefox_binary to the path a newer version of FF (D:\Portable_Apps\FirefoxPortable_59.0.2\FirefoxPortable.exe) Firefox portable splash screen shows but browser doesn’t open, then the openBrowser step errors after the Firefox portable splash screen disappears.

Unable to open browser with url: 'https://mysite/path' (Root cause: org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: 'MachineName', ip: '10.80.80.65', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: driver.version: CFirefoxDriver
remote stacktrace: )

Like the OP I am constrained by the corporate SOE as to what can be installed in the standard location.

I need to test several versions of Chrome as the end users are on different SOE’s from mine.

I couldn’t find the documentation for configuring custom browsers either, I think the ideal solution for me would be to configure a custom browser for each chrome / firefox / etc version.

I have ever encountered a similar problem.


I would describe here what I did to solve my problem, but I am afraid my note may not be helpful for you verify much.

I wanted to see exactly what kind of command line Katalon Studio executed in order to start browsers. I thought I need to get runtime log files chromedriver.log and firefoxdriver.log).

I made a Test Listener. It has @BeforeTestSuite method as follows:

class TL_Run {
    /**
     * Executes before every test suite starts.
     * @param testSuiteContext: related information of the executed test suite.
     */
    @BeforeTestSuite
    def sampleBeforeTestSuite(TestSuiteContext testSuiteContext) {
        String chromedriverlog = "C:\\Users\\myname\\tmp\\chromedriver.log"
        System.setProperty("webdriver.chrome.logfile", chromedriverlog);
        String firefoxdriverlog = "C:\\Users\\myname\\tmp\\firefoxdriver.log"
        System.setProperty("webdriver.firefox.logfile", firefoxdriverlog)
    }
}

By executing a test suite with this test listener, I got chromedriver.log file which contained following line at the end:

[1523860963.460][INFO]: Launching chrome: "C:\Users\myname\AppData\Local\Google\Chrome\Application\chrome.exe" --chrome.switches --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-extensions --disable-extensions-except="C:\Users\qcq0264\AppData\Local\Temp\scoped_dir4452_18782\internal" --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --proxy-server=ftp=172.24.2.10:8080;http=172.24.2.10:8080;https=172.24.2.10:8080 --remote-debugging-port=12886 --test-type=webdriver --use-mock-keychain --user-data-dir="C:\Users\qcq0264\AppData\Local\Temp\scoped_dir4452_21728" data:,

Also I got firefoxdriver.log file which contained following line:

1524206693512	mozrunner::runner	INFO	Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\qcq0264\\AppData\\Local\\Temp\\rust_mozprofile.DHJyFj7l5N9Q"

By checking the log file record I could find which path of browser binaries were actually used and what kind of command line switches were specified.

1 Like

Thanks, that actually helped a lot, I needed ‘binary’ not ‘chrome.binary’ and that got me to [1524801584.039][INFO]: RESPONSE InitSession session not created exception: Chrome version must be >= 62.0.3202.0

I’ll try using an older chorme driver and see if i can get it working.

all i’m getting for firefox is:

1524799837150 geckodriver INFO geckodriver 0.20.1

1524799837162 geckodriver INFO Listening on 127.0.0.1:34013

so no success there yet…

If I set the firefox_binary value to be a path that exists, but DON"T include the firefox.exe on the end,I get an error indicating it wanted to use the path but there was no file on the end of it.

If I INCLUDE the file part (firefox.exe) it seems to ignore the value completely and looks in the !system! PATH variable not the user account PATH variable which is obnoxious.