cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clickpath monitor with XML Page

headsy
Frequent Guest

Hi, I'm attempting to add some javascript to a clickpath to extract the text from an XML Page. I have this working with another clickpath using:

var text = 'An error occured';
var text1 = document.documentElement.innerText;
if (text1.match(/An error occurred/)) {
api.skipNextSyntheticEvent();
} else {
api.info("AUP found");
}

The issue i have is the line:

var text1 = document.documentElement.innerText;

times out when loading the XML Page (JS execution took too long). i've tried innerHTML but this also times out. Is it possible for a click path to do what i want on an XML page?

11 REPLIES 11

HannahM
Dynatrace Leader
Dynatrace Leader

Are you able to get the expected text if you interrogate the element in the Console in DevTools?
What size is the response? If you pipe the text1 to the logs - api.info() etc What is the output?

Synthetic SME and community advocate.

Hi Hannah,

when i put that in dev tools console i get the text of the page displayed as expected. its 4255 characters long. I've attempted to pipe to api.info and even to api.fail but the script does not reach that point. If the script only contains var text1 = document.documentElement.innerText; it still times out.

HannahM
Dynatrace Leader
Dynatrace Leader

Interesting. Can you go into chat so we can look at this?

 

Synthetic SME and community advocate.

headsy
Frequent Guest

in to chat? 

HannahM
Dynatrace Leader
Dynatrace Leader

The chat functionailty in the WebUI. That way we can looks at the monitor and page and see what's happening. If you do not have access to chat, you can create a Support ticket

Synthetic SME and community advocate.

we dont have chat so i've created a ticket #111989

Looks like any javascript action times out following the navigation to the XML page. even just
api.info("step 4");

or
api.fail("step 4");

HannahM
Dynatrace Leader
Dynatrace Leader

What version ActiveGate are you running this on? There was a similar sounding issue a while ago, but that was fixed around 1.229.

Synthetic SME and community advocate.

headsy
Frequent Guest
ActiveGate 1.225.137.20210922-101329
Synthetic 1.225.30.20211215-102023
Chromium 92.0.4515.131

oh no. Were in the process of updating but will be in the new year now.
 

HannahM
Dynatrace Leader
Dynatrace Leader

Ah, ok. Unfortunately, there was no workaround and upgrading was the only solution. 😞

Synthetic SME and community advocate.

OK, I shall see how it goes when we are updated in the new year. thanks for the help

Featured Posts