Set default FF profile in com.kms.katalon.core.webui.firefox.properties

Any idea what to add here if I want FF to use my default profile?

thanks a lot kazurayam. I’ve tried the steps you posted at that link yesterday. It’s working fine.
But the problem is if I want to run a testsuite, it will not reuse the same driver and browser for the next testcase. So I have to declare the steps in each testcase. Any idea how to resolve it?

I have tried to just define it in @BeforeTestSuite, but it won’t help. Basically the next testcase will not reuse the same test instance of browser.

That’s why I hope I can just define to use the default profile from com.kms.katalon.core.webui.firefox.properties

I’ve actually post the question yesterday in Opening Firefox with a Specific, non anonymous profile

I don’t understand what you mean. Then how the test suite works? Could you take a video and share it?

How many Firefox windows do you see opening and closing?

How do you call WebUI.closeBrowser()? In the @AfterTestSuite? or at the end of each test cases?

thanks for the reply.
you can try to create a testsuite with 2 testcases and with your FF profile setup.
can you make both 2 testcases to run on the same FF browser (same execution session) ?

Or you can try to rerun a simple testcase, with these steps:

  1. write a simple testcase (just open FF browser) to include the FF profile setup.
  2. run the testcase with FF in execution menu so it will open the FF browser
  3. do not close the FF browser from the testcase, leave the current execution session open.
  4. pull down the execution menu (see screenshot)
    result:
    do not see the ‘execute current session’ for FF
    37%20PM

see the example of Chrome with both options after testcase execution
00%20PM

BTW, I also tried to do the same on Chrome with the similar setup. The issue will happen in Chrome (no execute current session option). So the issue is not browser specific.

I think one solution is to save the driver
from WebDriver driver = new FirefoxDriver(options)
to a user-defined GlobalVariable as GlobalVariable.driver

then pass the GlobalVariable.driver into each testcase before calling WebUI.
DriverFactory. changeWebDriver (GlobalVariable.driver)

it seems to be working for me to run all testcases in a testsuite with only one browser/driver instance.

@JOE_F

Still I do not understand what you are doing, what you want to see.

I need to reproduce your project on my PC and see.

Could you please share all codes of your test cases and test suite? and tell us what you expect to see.

Do you think it is important for you? Why? Please explain. Do you want to reuse a session between Katalon Studio and FireFox (which is left unclosed) across multiple executions of test case run (=multiple clicks of gree arrow button)?

that’s fine. thank you for your help.
I think I have resolved the issue to reuse the same instance for multiple testcases in the testsuite with the approach I mentioned. i.e. To pass the newly defined FF driver to every testcase.

It’s important for our project to reuse same session (driver) to run all testcases as it involves a very complicated login process to use our applications (smartcard login and accept certificate and user pin or RSA token, it’s very very crazy due to the nature of our projects!!!). so it’ll be very time consuming if it needs to login to the same application for every testcase.

Anyway, thanks so much for your help.

1 Like