# Clickpath monitor with XML Page

**URL:** <https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746>\
**Category:** Synthetic Monitoring\
**Tags:** javascript, synthetic-monitoring\
**Created:** [December 19, 2022, 3:38pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746 "2022-12-19T15:38:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 19, 2022, 3:38pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/1 "2022-12-19T15:38:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [December 20, 2022, 9:04am UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/2 "2022-12-20T09:04:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 20, 2022, 9:19am UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/3 "2022-12-20T09:19:20Z")

</div>

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&nbsp;var text1 = document.documentElement.innerText; it still times out.

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [December 20, 2022, 11:15am UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/4 "2022-12-20T11:15:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 20, 2022, 11:32am UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/5 "2022-12-20T11:32:58Z")

</div>

in to chat?

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [December 20, 2022, 11:50am UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/6 "2022-12-20T11:50:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 20, 2022, 12:29pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/7 "2022-12-20T12:29:30Z")

</div>

we dont have chat so i’ve created a ticket&nbsp;#111989

---

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 20, 2022, 12:34pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/8 "2022-12-20T12:34:07Z")

</div>

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”);

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [December 20, 2022, 2:28pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/9 "2022-12-20T14:28:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 20, 2022, 2:33pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/10 "2022-12-20T14:33:02Z")

</div>

ActiveGate 1.225.137.20210922-101329Synthetic 1.225.30.20211215-102023Chromium 92.0.4515.131

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

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [December 20, 2022, 3:10pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/11 "2022-12-20T15:10:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![headsy](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@headsy](https://community.dynatrace.com/u/headsy)\
**Post date:** [December 20, 2022, 3:15pm UTC](https://community.dynatrace.com/t/clickpath-monitor-with-xml-page/37746/12 "2022-12-20T15:15:04Z")

</div>

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