How to open a new Chrome’s tab? A detail example would be much appreciated!

Hi there,

I would like to open a new browser tab by Katalon? Could you please give a detail instruction?




Thanks much!

Hi there,

You can press ‘Ctrl + T’ key to open new tab in Chrome by using ‘Send Key’ action:

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import as MobileBuiltInKeywords
import as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys


WebUI.sendKeys(findTestObject(null), Keys.chord(Keys.CONTROL + ‘t’))

For me it doesn’t open a new tab, although the test case succeded.
it says:
Keys ‘CONTROL + t’ sent to object: ‘tempBody’

For me it didn’t work as well. The problem is with using the WebUI for sending the keys… It doesn’t actually send the keys.
One way of fixing it is using the java.awt.Robot library:,%20int)

Here is an example code:

import java.awt.Robot as Robot
import java.awt.event.KeyEvent as KeyEvent

Robot robot = new Robot()


I Have also tried it but all it does is replace the page URL. Do i need to install or import something?

1 Like