RBM script (which includes Java Script) executes to completion on the Cloud Monitor Recorder. But in ASM, it stops partially through with no visible error.

book

Article ID: 8190

calendar_today

Updated On:

Products

CA Application Synthetic Monitor (ASM) CA App Synthetic Monitor NIMSOFT CLOUD USER EXPERIENCE MONITOR

Issue/Introduction

 We have a RBM script which runs successfully in the Cloud Monitor Recorder.

 However, when deploying the script to ASM, it always stops at the same point as seen in the waterfall report.  Also, it does not report any error. The step that should be executed next contains Java Script.

Cause

The RBM monitor environment in ASM runs Firefox and supports Firefox features that are valid up until Firefox 37.

The Java script in this case was using the Node.innerText property, not available until Firefox 45.

Environment

RBM script using ASM 8.7 (or earlier)

Resolution

Modify the Java script in the RBM script not to use the Node.innerText property e.g. change

document.getElementById("firstPosition").value = document.getElementsByName("frmPwd")[0].getElementsByTagName("label")[0].innerText.replace(/[^0-9]+/, "");

with

document.getElementById("firstPosition").value = document.getElementsByName("frmPwd")[0].getElementsByTagName("label")[0].textContent.replace(/[^0-9]+/, "");