Prevent browser from closing after every test from test suit

I have test suit which contains only one test case but I am using multiple data from data files.

The issue I have is that everytime test case finish with one data browser close and open again for another test data.

Is there a way to leave the browser open for all test data and browser would close once all test data have been tested.

Any suggestion would be helpful.

Create one Test Case that opens a browser, then calls a second test case and then closes the browser after the second test case completes…

In the second test case, create a loop that retrieves data from an Excel worksheet and performs a repeatable set of steps for each of the rows in the Excel worksheet that you would like to cycle through without closing the browser…

1 Like

Thanks David,

I have tried just putting loop within same test case but leave open and close browser outside of loop and it worked.


You can also uncheck Terminate drivers after each Test Case under Project-Settings-Execution-Default.

1 Like

Thanks Susan,

I have tried initially when I wanted to try this but it did not work for me.
I am using katalon on Mac.

It sounds like you need a data drive test suite, which isn’t actually available, but can be done using what David describes. You have a Test Case that opens the browser, then calls all the other Test Cases you need, then closes out. It would be a series of:

WebUI.callTestCase(findTestCase('Test Cases/Test Case Location/Test Case Name'), [:], FailureHandling.CONTINUE_ON_FAILURE

Please how did you achieve this?

hey sir please how can i let this code in this test case that repeat everytime it finish with getting data from exel file ?‘Object Repository/Search_repo/Page_Page de dmarrage/a_Contrats de client’))‘Object Repository/Search_repo/Page_Page de dmarrage/a_Rechercher un contrat’))

WebUI.setText(findTestObject(‘Object Repository/Search_repo/Page_Rechercher un contrat/input_Code contrat_CO_ID_PUB’), cocode)‘Object Repository/Search_repo/Page_Rechercher un contrat/input_Cl publique_SuSubmitButton’))‘Object Repository/Search_repo/Page_Rechercher un contrat/a_CONTR0005980788’))

The easiest way is to add a TestListener, in the left bar, which executes an action before each testCase, example:
def open Browser () {
WebUI.openBrowser (‘’)

Note: you must remove the function from the testCase because the TestListener will open the browser before each testCase