'Open browser and navigate to website katalon.com'
WebUI.openBrowser('https://www.katalon.com/')
'Click on Documentation to open another window'
WebUI.click(findTestObject('Page_Katalon Studio/a_Documentation'))
'Switch to Documentation window'
WebUI.switchToWindowIndex(1)
'Close browser'
WebUI.closeBrowser()
With the WebUI.switchToWindowIndex() code, you can provide redirects to the web page you want in the code. Indexing starts from 0. So to open tab 1:
WebUI.switchToWindowIndex(0) and So to open tab 2 : WebUI.switchToWindowIndex(1) sholud be add code.