Switch To Windows failed because timeout error

I’m using switchToWindowTitle keyword and it failed a lot of times when running test cases. I don’t know why it failed. The log error from katalon does not help me anything in debugging or guessing why I got the problem. When I use selenium, the error message is very easy and clean to understand. Katalon shows much many of information but it does not helpful
My error:

I saw other topics with the same issue with me. One of members from Katalon Team said the issue will be fixed in the next release. From 2020 to now, the issue still happening

COULD ANYONE PLEASE HELP ME HANDLE THE ISSUE OR GIVE ME A WORKAROUND SOLUTION? I’M REALLY STUCK AND I DON’T KNOW WHAT SHOULD I DO

Hi,

Thank you for letting us know. I will raise the ticket internally and ask for the workaround, meanwhile, we will also see if any way to improve error log. Can you please help give more information: Katalon version, Os, OS version, steps to reproduce … Thank you!

My information:
Katalon Studio Enterpirse 8.4.1
OS: Windows 10
OS version: Windows 10 10.0.19044
Step to reproduce:

  1. Start window application by keyword: startApplication
  2. Wait until the application is started
  3. Using keyword switchToWindowTitle to switch to another screen

Could you please provide me a workaround solution?

I used switchToWindowTitle() on a Search screen until the Developers changed the title to just “Search” and I couldn’t get the “title” to work.with a number of permutations I tried :slight_smile: . I then eventually changed the statement to switchToWindowIndex(1). Maybe you can try that?

Note: I also use switchToWindowIndex('1') and WebUI.switchToWindowIndex("1") (using a String reference) in some locations and I haven’t noticed a difference in performance between them.

Note 2: I noticed the Search screen flashing when I was using the switchToWindowTitle() after the name change as KS was “searching” for the title, but not finding it.

Edit: and there is the statement, WebUI.closeWindowIndex(1) should you need to “cancel” the window.

I’m working on Desktop Application. It seem does not to have the function switchToWindowIndex. Could you please suggest me another one?

Sorry, I should have noticed that in your heading. Well, Google says there is:

Windows.switchToWindow(findWindowsObject('Object Repository/Window'))

[Windows] Switch to Window | Katalon Docs

I’m using this keyword and sometimes it failed like my description of the topic. Hmm, it seems Katalon does not have any solution for this one.