Thanks, but I actually found a way around this, some hyperlinks automatically open in a new tab as such I used one of these links on the MediaWiki website and then I created this method:
WebUI.openBrowser('google.com')
openTab()
import com.kms.katalon.core.testobject.ConditionType as ConditionType
//import org.openqa.selenium.Keys as Keys
Void openTab() {
String currentPage = WebUI.getUrl()
int currentTab = WebUI.getWindowIndex()
WebUI.navigateToUrl('https://www.mediawiki.org/wiki/Special:Contributions/')
TestObject helpButton = new TestObject('Help')
helpButton.addProperty('class', ConditionType.EQUALS, 'mw-helplink', true)
helpButton.addProperty('text', ConditionType.EQUALS, 'Help', true)
helpButton.addProperty('tag', ConditionType.EQUALS, 'a', true)
WebUI.click(helpButton)
WebUI.switchToWindowIndex(currentTab+1)
WebUI.navigateToUrl(currentPage)
/*TestObject body = new TestObject('body')
body.addProperty('tag', ConditionType.EQUALS, 'body')
WebUI.sendKeys(body, Keys.chord(Keys.CONTROL + Keys.SHIFT + Keys.TAB))*/
WebUI.switchToWindowIndex(currentTab)
WebUI.navigateToUrl(currentPage)
WebUI.switchToWindowIndex(currentTab+1)
}
The only problem I have with it is that I can’t actually do the switching of the tabs as I intended, you can see the commented code in there that is my attempt at making the switch, it did not work, can you help me out with that?