WebDriver script failing

book

Article ID: 198043

calendar_today

Updated On:

Products

CA App Synthetic Monitor NIMSOFT CLOUD USER EXPERIENCE MONITOR DX Application Performance Management

Issue/Introduction

I have a WebDriver script that is failing, but I am not seeing any log information. Please let me know why the script is failing?
Seeing that the Sign-in failed with a "System is Unavailable" message.

Cause

Step causing the issue:

Step 4 - waitForPageToLoad.

EXPECTED BEHAVIOR:

The monitor is waiting for a page to be loaded.

ACTUAL BEHAVIOR:

Login on the previous step does not cause reload of the page, it uses ajax instead.

Since that - the Webdriver decides the page is loaded already, which is true.

Webdriver decides the last step as executed and interrupts the connection.

In the report, we see browser errors that XHR request to the backend was interrupted.

15:20:44
 
https://zzz.com/idp/7C88F960/authentication - Failed to load resource: net::ERR_PROXY_CONNECTION_FAILED
 SEVERE

15:20:44
 
https://zzz.com/idp/dist/main.js?v=QQ8vHzn2xJBHLoTwYg0cyPU6z4E_nRDX1gUIAhCb2QY 5:105674 "Network Error"

At the same time on the browser side, the website JS script catches the network error and shows a message "System is unavailable...".

Environment

Release : SAAS

Component : CA APP SYNTHETIC MONITOR (WATCHMOUSE)

Resolution

Do not use command waitForPageToLoad after login, since there is no page reload.

Use command waitForText, waitForElementPresent or something similar instead.

 

 

Additional Information

Why is it working in Selenium IDE or Katalon Recorder and not working in ASM?

 

On the client machine, the internet connection is consistent. After the script executed already, a browser continues to load the page until done.

The ASM environment is working differently, like a sandbox. It creates and then interrupts network connection for each session separately.

The connection is being interrupted when the last step is executed.