SWTException - Unable to capture objects/elements

SWTException thrown - unable to capture elements
Attached logs
SWTexception.txt (239.4 KB)

Please advice me, how to handle alert/popup window?
Version - 7.2.1

Hi @pru,

The Alert dialog is separated with your main application. You can use Switch To Window Title action and enter Alert as the Alert title to automate actions on the Alert.

After working with alert, you need to use Switch To Window Title action and enter the application title to switch back to your application.

Thanks

Hi @duyluong,

Thanks for your update!!!

I have tried with Switch to Window Title action,but it doesn’t helped me.

Scenario is - When i click New Batch Button , my application prompt alert window and at same time Katalon throwing error(Trying to capture new window elements, but it couldn’t able to capture).

On screen With Alert window performing Switch to Window Title Action
Using Task manager - Setting Alert window Bring to front - Perform the operation - below the error description

  • com.kms.katalon.composer.windows.exception.WindowsComposerException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: 120f40 is not a top level window handle (WARNING: The server did not provide any stacktrace information)

On screen With Alert window performing Switch to Application Action

  • SWTexception, Unable to capture elements error.

Any possible way to capture elements??

Hi @pru,

com.kms.katalon.composer.windows.exception.WindowsComposerException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: 120f40 is not a top level window handle (WARNING: The server did not provide any stacktrace information)

This error means the Alert window is still inside your main application. In this case, you need to Switch to desktop and select your application window again then click on Switch to Window.

Both Switch to Window and Switch to Window Title are only available for the Window that’s under the root desktop.

It’s better if you can share with us the error .log file.

Thanks

Hi @duyluong

Thanks for the update…!!!

I have tried Switch to Desktop Action - The result is SWTexception, Unable to capture elements.

Attached logs and scrn shot.

Record_logs.txt (62.7 KB)
SPY_Object_Logs.txt (20.8 KB)

Record mode - Throwing the SWTexception exception.

  • I can’t access Main window without closing the Alert window.
    Spy Mode - No elements found (Check attached scrn shot)

please let me know if require more logs.
Thanks.