<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: browser click path with javascript as the first function in Synthetic Monitoring</title>
    <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/browser-click-path-with-javascript-as-the-first-function/m-p/189073#M1380</link>
    <description>&lt;P&gt;Do you need to wait 10s between each fetch? Could this be lowered? Alternatively, could you run the same but as an HTTP Monitor, running the check every minute but on 6 locations (so the url would be checked every 10s) and then use the outage handling settings to handle how many consecutive failures you are interested in.&amp;nbsp;&lt;BR /&gt;Another alternative might be to join the HTTP Monitor Advanced Settings preview a this would provide the option of running an HTTP Monitor with upto 5 minute timeout.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2022 09:03:25 GMT</pubDate>
    <dc:creator>HannahM</dc:creator>
    <dc:date>2022-06-24T09:03:25Z</dc:date>
    <item>
      <title>browser click path with javascript as the first function</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/browser-click-path-with-javascript-as-the-first-function/m-p/189023#M1378</link>
      <description>&lt;P&gt;This works great, except in the case of the load time of one of the test url's takes to long and puts the javascript over the 60 second mark.&amp;nbsp; It will then fail without performing all the tests and won't get to the main point of the test to fetch that url which sets a flag.&amp;nbsp; As you can see I have a sleep function to allow it to wait 10 seconds between tests.&amp;nbsp; The average load time of that page is 77ms.&amp;nbsp; Now if the page takes 5 seconds to load we will hit the 60 second timeout of javascript funtion.&amp;nbsp; Is there a way to catch that timeout?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"configuration": {&lt;BR /&gt;"chromiumStartupFlags": {&lt;BR /&gt;"disable-web-security": false&lt;BR /&gt;},&lt;BR /&gt;"device": {&lt;BR /&gt;"orientation": "landscape",&lt;BR /&gt;"deviceName": "Desktop"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"type": "clickpath",&lt;BR /&gt;"version": "1.0",&lt;BR /&gt;"events": [{&lt;BR /&gt;"type": "javascript",&lt;BR /&gt;"wait": {&lt;BR /&gt;"waitFor": "next_event"&lt;BR /&gt;},&lt;BR /&gt;"description": "EBSAccessScript",&lt;BR /&gt;"javaScript": " function UrlExists(url) {\r\n var http = new XMLHttpRequest();\r\n http.open('HEAD', url, false);\r\n http.send();\r\n if (http.status == 200)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n\r\n\r\n function sleep(milliseconds) {\r\n const date = Date.now();\r\n let currentDate = null;\r\n do {\r\n currentDate = Date.now();\r\n } while (currentDate - date &amp;lt; milliseconds);\r\n }\r\n\r\n for (let i = 0; i &amp;lt; 5; i++) {\r\n sleep(10000);\r\n if (!UrlExists(\"&lt;A href="http://erpprod.sonoco.com/OA_HTML/AppsLocalLogin.jsp\" target="_blank"&gt;http://erpprod.sonoco.com/OA_HTML/AppsLocalLogin.jsp\&lt;/A&gt;")) {\r\n if (i == 4) {\r\n fetch('&lt;A href="https://test02.sonoco.com/mysfsvc-rint/common/set_downtime_status/DOWN/g5H37k');\" target="_blank"&gt;https://test02.sonoco.com/mysfsvc-rint/common/set_downtime_status/DOWN/g5H37k');\&lt;/A&gt;r\n api.fail(\"MYSF has been set to downtime.\");\r\n }\r\n }\r\n }"&lt;BR /&gt;}, {&lt;BR /&gt;"type": "navigate",&lt;BR /&gt;"wait": {&lt;BR /&gt;"waitFor": "page_complete"&lt;BR /&gt;},&lt;BR /&gt;"description": "Loading of \"&lt;A href="http://erpprod.sonoco.com/OA_HTML/AppsLocalLogin.jsp\" target="_blank"&gt;http://erpprod.sonoco.com/OA_HTML/AppsLocalLogin.jsp\&lt;/A&gt;"",&lt;BR /&gt;"url": "&lt;A href="http://erpprod.sonoco.com/OA_HTML/AppsLocalLogin.jsp" target="_blank"&gt;http://erpprod.sonoco.com/OA_HTML/AppsLocalLogin.jsp&lt;/A&gt;"&lt;BR /&gt;}]&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 20:10:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/browser-click-path-with-javascript-as-the-first-function/m-p/189023#M1378</guid>
      <dc:creator>tchaffee</dc:creator>
      <dc:date>2022-06-23T20:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: browser click path with javascript as the first function</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/browser-click-path-with-javascript-as-the-first-function/m-p/189073#M1380</link>
      <description>&lt;P&gt;Do you need to wait 10s between each fetch? Could this be lowered? Alternatively, could you run the same but as an HTTP Monitor, running the check every minute but on 6 locations (so the url would be checked every 10s) and then use the outage handling settings to handle how many consecutive failures you are interested in.&amp;nbsp;&lt;BR /&gt;Another alternative might be to join the HTTP Monitor Advanced Settings preview a this would provide the option of running an HTTP Monitor with upto 5 minute timeout.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 09:03:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/browser-click-path-with-javascript-as-the-first-function/m-p/189073#M1380</guid>
      <dc:creator>HannahM</dc:creator>
      <dc:date>2022-06-24T09:03:25Z</dc:date>
    </item>
  </channel>
</rss>

