Jenkins & Katalon Studio 5.4 doesn't work with FIrefox and IE

## Windows 10, 64Bit
## Katalon Studio Version: 5.4.0, Build 1
## Katalon Studio logs: attached
## Environment (for Web testing):
- Jenkins 2.107.2
- Browsers:
Google Chrome Version 66.0.3359.117 (64-Bit)
Firefox Quantum 59.0.2 (64-Bit)
IE 11.371.16299.0

## Steps to reproduce:
- With Katalon Studio create a simple test case which only opens a reachable URL and closes the browser afterwards
- Within Katalon Studio you can test this by usage of different browsers successfully
- After that generate the regarding property file for the same test case (or better test suite)
- Open a Win Cmd line and execute the test again by usage of the property file
- This works as well for all browsers

- Now setup Jenkins and create a simple “Free Style” job, where you insert in the Build Procedure as Windows Batch:
cd /D
katalon -email= -password= -propertiesFile="\console.properties" -runMode=console

- Save the Jenkins job, start it afterwards and watch the console output in Jenkins
=> For browserType=Chrome it should work
=> For browserType=Firefox or IE it will not

Please find the content of the logfiles (Jenkins and Katalon) attached.
Any assistance would be much appreciated.
Kind Regards
Uwe

Jenkins_Console.log

.log

Got same issue…

I really don’t like to bother anybody, but need to ask the Katalon Team if there are any news regarding this topic. I need to use Firefox and IE in my tests because Chrome is not fully supported by the application I have to test.
Thx a lot in advance

Any new regarding this topic?

@Vinh Nguyen

Hi Vinh,
would it be possible to get any answer or update regarding this issue?
This would much appreciated, because I have to perform the automated tests with different browser types.
Kind Regards
Uwe

Another workaround solution to Firefox: https://stackoverflow.com/questions/50007321/process-unexpectedly-closed-with-status-0?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

=> setting “security.sandbox.content.level” to “5” in the Firefox profile

Below is sample code, you need to REPLACE code after ‘import’ statement with ‘Open Browser’ step:

import org.openqa.selenium.WebDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.remote.DesiredCapabilities
import com.kms.katalon.core.webui.driver.DriverFactory
System.setProperty("webdriver.gecko.driver","/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/drivers/firefox_mac/geckodriver");
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("security.sandbox.content.level", 5)
DesiredCapabilities cap = DesiredCapabilities.firefox()
cap.setCapability(FirefoxDriver.PROFILE, profile)
FirefoxOptions opt = new FirefoxOptions()
opt.merge(cap)
WebDriver driver = new FirefoxDriver(opt)
DriverFactory.changeWebDriver(driver)

Hi Vinh,
thanks a lot. I will test how this works. :slight_smile:

Hi Vinh,
I tested both workarounds on my WIndows machine.

1. setting “security.sandbox.content.level” to “5” in the Firefox profile
If the test is started from a Jenkins job via a cmd batch script on the test server then - unfortunately - there is no Firefox profile I could use (environment USERNAME=<computername$>.

2. The path /Applications/…/resources/drivers/**firefox_mac/**geckodriver lets me assume that you are working on a Mac. As I work on a Windows machine I had a look in the directory tree and replaced firefox_mac by firefox_win64 .

There is an geckodriver.exe in that subdir:
…\KatalonStudio\configuration\resources\drivers\firefox_win64\geckodriver.exe

Unfortunately I still get following error if I start the test in Katalon:

The driver executable does not exist: T:\Applications\Katalon Studio.app\Contents\Eclipse\configuration\resources\drivers\firefox_win64\geckodriver

I have no idea why this happens. Could you give me a hint please?

Thanks a lot in advance.
Uwe

Found one root of the issue:
Replaced the whole path by the right Windows path:
System.setProperty(“webdriver.gecko.driver”,“C:/KatalonStudio/configuration/resources/drivers/firefox_win64/geckodriver”);

Starting the test directly inside Katalon Studio => it works
Starting from Jenkins by batch => it doesn’t and shows nearly the same error message

Uwe,

How do you write in your code at the ??? position below?

System.setProperty("webdriver.gecko.driver","???");

Hi Kazurayam,
I used the Windows path including “geckodriver.exe”:
??? = C:/KatalonStudio/configuration/resources/drivers/firefox_win64/geckodriver.exe

I inserted into my small test script after the common import statements following code:

— Snippet START —
import org.openqa.selenium.WebDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.remote.DesiredCapabilities
import com.kms.katalon.core.webui.driver.DriverFactory

// Workaround: Modify Firefox driver
System.setProperty(“webdriver.gecko.driver”,“C:/KatalonStudio/configuration/resources/drivers/firefox_win64/geckodriver.exe”);
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference(“security.sandbox.content.level”, 5)
DesiredCapabilities cap = DesiredCapabilities.firefox()
cap.setCapability(FirefoxDriver.PROFILE, profile)
FirefoxOptions opt = new FirefoxOptions()
opt.merge(cap)
WebDriver driver = new FirefoxDriver(opt)
DriverFactory.changeWebDriver(driver)
// A simple test
WebUI.openBrowser(’’)
— Snippet END —

Looking in the Katalon report until
com.kms.katalon.core.webui.driver.DriverFactory.changeWebDriver(driver)
everything is fine.

But the openBrowser() throwes following error:

Unable to open browser with url: ‘http://localhost/iManSys
(Root cause:
org.openqa.selenium.WebDriverException: Process unexpectedly closed
with status: 0

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time:
‘2017-11-06T21:07:36.161Z’

System info: host: ‘PATRICK’, ip: ‘192.168.100.77’,
os.name: ‘Windows
10’, os.arch: ‘amd64’,
os.version: ‘10.0’,
java.version: ‘1.8.0_102’

Driver info: driver.version: CGeckoDriver

remote stacktrace: stack backtrace:

0: 0x4821c4 -

1: 0x482933 -

2: 0x445159 -

3: 0x44c838 -

4: 0x43026a -

5: 0x40ba4e -

6: 0x4119b9 -

7: 0x6d2c89 -

8: 0x426006 -

9: 0x6cd490 -

10: 0x7ffb95391fe4 - BaseThreadInitThunk)

I know that Vinh wrote “replace” openBrowser step.I kept it the code because I think somehow I have to open a browser session.

Thanks a lot in advance.
Uwe

I copied&pasted your test script and saw what’s happening.

I kept it the code because …

You kept the line of ‘WebUI.openBrowser()’ — this is a fault, I think. Because the preceding line:

WebDriver driver = new FirefoxDriver(opt)

already opens a Browser session.

You should not call WebUI.openBrowser(). If you do it, another Browser session will be started. The latter session will have the same capabilities as the one of “Execution>Default>Web UI>Firefox”

Rather you should do:

WebDriver driver = new FirefoxDriver(opt)
DriverFactory.changeWebDriver(driver)
WebUI.navigateToUrl('<URL>')

Thanks a lot. :slight_smile:
This was the essential hint. Now it works.

Having this issue still with IE. Was anyone able to get this working?