In desktop testing, How to find a tab in a window

I hqve posted a qustion but i unabel to find it so confused

1 Like

I’m confused by this “question” you posted…

1 Like

I want to locate and assert a tab in a window on my desktop application testing, I have tried below code, but basic issue is I unable to identify the tab locator name/id/automatiid as inspect.exe only spy on its parent and shows the required tab as first child. Any pointers on HOw to identify a xpath if I know parent and child, or How to identify a tab in a Window example using getwindowhandles()


//which i visually see taking me to 5thtab)
//After this it failing from below step as null pointer
Windows. Switchtowindow(tab5)

// I find that Windows.getWindowHandles().get(0), not tried yet but i dont see it i katalon this supports?

1 Like

The above is brilliant. Now you carry on like you would if you were using mouse.

for(i = 0; i < 5; i++) {

You might be able to try selecting the tab area specific for each Tab to see if you can get any other Windows Object. Do not try to select anywhere outside of the “raised” bit of the Tab. Also, just curious, are the tab areas across the top or down the side?
You likely do not have any definition for the Windows Object, tab5. That’s why you get a “null”.

Note: it was over a decade ago and another testing app that I was using.


Thank you, it worked . after the loop, Keys.chord(Keys ARROW UP)
Then tried Windows.verifyelementPresent(tab5)
Which passed the test.

1 Like

Also if add below function until loop finds the tab Windows.verifyElementPresent(obj) with FailureHandling.optional , works like a pro