[Orientation] My WebUI automation no longer works

Hello.

Currently they have made an update to the platform that I am automating. They have blocked the option to inspect by any means.
I can no longer get the XPaths of the objects and all my automated cases stopped working.
When entering the URL after a few seconds it ends up redirecting to [about:blank] and the process fails.
I tried to configure my scripts simulating “human” interactions, which had no results. Additionally, I configured some alternatives through the desired capabilities, but even so, on all occasions when executing the case flows, after a few seconds it ended up referring to about:blank , preventing the processes from being completed.

Issue:
“org.openqa.selenium.NoSuchWindowException: no such window: target window already closed”


Thank You

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi @daniel.fernandez.d,

Have you tried to open the url manually and successfully? If not successful, I think the problem is the url

1 Like

Either window is already closed.window you are looking to open doesn’t exist. Are you able record and playback ?

If the “Inspect” is removed from your pop-up when you right click, can you try with the F12 key and then click on “Open DevTools”? The first icon on the top left of the DevTools area is an “inspector” that should allow you to review the specific HTML of an element on your page. A short cut for the “inspector” should be CTRL + SHIFT + c and then click on your object to display its HTML.

Additionally, you should still be able to use Katalon’s Web Spy tool although you won’t see the HTML but you will get very basic pathways. It may show that the pathways to your objects have changed, maybe even they’re dynamic pathways now.

And it sounds like your network team has been busy. You will have to talk to them to assist you or, if they won’t, then talk to your Supervisor/Project Manager to get involved (have a meeting) to resolve the redirecting issue.

Verify if there is any code in your Test Listener which may be causing this.

Solutions

  1. Verify Window Handle: Ensure that the window handle or name being used is accurate and current. You can check the browser’s window handles to verify that the specified handle or name uniquely identifies the target window or tab.
  2. Wait for Window to Load: Apply explicit or implicit waits to allow the window or tab to open or load before trying to interact with it. This ensures that Selenium does not try to switch to the window before it has been opened or loaded.
  3. Handle Window Closure Gracefully: Implement exception handling to manage scenarios where the window might be closed unexpectedly. For example:
    try {
    driver.switchTo().window(windowHandle);
    } catch (NoSuchWindowException e) {
    System.out.println("Window already closed: " + e.getMessage());
    // Handle the exception, e.g., by switching to a different window or ending the test
    }