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:
User1(host) start a meeting using his meeting URL
User2 join the meeting using host meeting url
Now Host validate if he can perform certain action on the guest cue
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 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?
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.
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.