How to record a test script for a different tab in a browser?

Hi, i have created a test script.
In my UI, the screen show something like this
image

It have a different tab, and each tab have different information.
I have record the test script using web record, however when rerun the test script, it failed to go to second tab.

Is there any ways to do this?

@insyirahmajid, you may need to manually switch windows, start here: https://docs.katalon.com/katalon-studio/docs/webui-switch-to-window-index.html

You may need to use: https://docs.katalon.com/katalon-studio/docs/webui-wait-for-element-visible.html or other waits, like https://docs.katalon.com/katalon-studio/docs/common-delay.html

@Dave_Evers

I think you misunderstood. @insyirahmajid’s “something like tab” is not what we call “browser’s tab or window”. I think it is something implemented within a HTML body using CSS + JavaScript (e.g, Bootstrap Navs and Tabs).

@insyirahmajid

Have you seen the HTML source code of your target page?

Are you aware how “something like tabs” are implemented?

I guess, the what you call “something like tab” is implemented as a complex HTML markups + CSS + JavaScript. You should understand how it is implemented.

It really depends on how your HTML source is coded. Your HTML might be so complexed (uses like Bootstrap Navs and Tabs ?) that Katalon’s Recorder tool may not be able to generate appropriate locators to operate “something like tabs”.

I suppose you need to read the HTML source and write appropriate locators (xpath or css selector) manually.

If you need to learn XPath, see https://www.guru99.com/xpath-selenium.html