Using WebUI.openBrowser('') to open multiple browsers to perform actions on those browser

Instead of running test on specific browser, in script level If we can declare which browser instance to open and at the same test script if we can at least create 2 browser session to perform action on the test, that would be great to use this tool for automation for my organization. Let me explain the sample test case scenario:
Step:

  1. User1(host) start a meeting using his meeting URL
  2. User2 join the meeting using host meeting url
  3. Now Host validate if he can perform certain action on the guest cue
  4. Guest validate the guest functionality in the room as well

Note: So we need two browser instance to perform host and guest functionality in the meeting room.
Can this be done so that we can do POC for our organization
Thank you.

1 Like

Currently Katalon Studio has not supported the feature yet. I would suggest them supporting it in the near future.

In order to setup above test case, we are not only open 2 browsers, but also 2 different browsers to avoid sharing session, etc. It would be a complex situation to consider more.

Thank you for the update. That would be great if we could create and control multiple session from test cases.
Just to make sure we can only open 2 different browsers from test suite collection only right?
I actually try to cover the above scenario using test suite collection. Like host Start meeting from chrome browser and guest join meeting from firefox browser when i run the parallel test. but when host try to validate room functionality in the meeting room while meeting is running, guest join meeting test suite execute ended and my test case get fail. If we could keep the guest session open we could perform the action.
However is there anyway we can create a custom keyword to initiate a specific browser session?

Trong Bui said:

Currently Katalon Studio has not supported the feature yet. I would suggest them supporting it in the near future.

In order to setup above test case, we are not only open 2 browsers, but also 2 different browsers to avoid sharing session, etc. It would be a complex situation to consider more.

I will prefer to make it to test case level. so tester can decide which test case run in what type of browser.

is this feature have any support yet?

Hello,

what about this workaround? Would it be suitable for you?

Thanks Marek for your help. Actually by creating new browser instances in send script provided me workaround.

Hi,

Can we do this in the UI?

I want to have two browser windows or tabs opened and navigate to two (2) different sites. Changes entered in one site would be seen on the other.

I currently have this setup using Robotframework (Selenium) where multiple browser sessions can be opened and they can be switched via alias. Katalon does not seem to have this basic functionality ingrained as the only switch options are via index or window name … the names of the windows change often and i would rather reference the windows by alias rather a the titles. Index is not reliable as well because in some instances The other site is opened first.

https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Switch%20Browser

https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser

You can not open 2 browsers using WebU.openBrowser() keyword.

If you want to open 2 browsers and work on them simultaneously, you need to work with org.openqa.selenium.WebDriver objects yourself. You want to create 2 instances of WebDriver objects. By doing so, yes, you can open 2 browsers.

An instance of WebDriver object is working behind the WebUI.* keywords of Katalon Studio. But Katalon Studio assumes that you work on test scenarios that require only a single instance of WebDriver. Those test scenarios that require multiple browsers are out of the scope of Katalon Studio.

If I were to write a set of tests that drive 2 browsers, I would not do it in Katalon Studio. I would write test codes that call Selenium WebDriver API directly. I would employ some libraries that help writing codes with “Page Object Model” like GEB. 31 Dec 2021. I stroke out this. I could employ POM in Katalon Studiio. See below.


By the way, I have ever done an experiment. Please have a look at this:

This sample shows how to open 2 ChromeDrivers and how to switch the target of WebUI.* keywords’ to one of them.

I am not sure if you find it useful.

Here is a sample project to test a Blog web app using 2 browser windows in Katalon Studio.