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

Continue to check/execute rest of the synthetic events in browser click path

AK
Pro

Hi,

Is it possible in browser click path monitor to continue execution of rest of the synthetic events even if any middle event/step fails?

Thanks...

8 REPLIES 8

ChadTurner
DynaMight Legend
DynaMight Legend

i believe so but it depends on how your click path is set up. Lets say it fails on step 5, If step 5 is contingent on accessing step 6, then it will not be able to proceed.

-Chad

Hi ,

I believe it is not possible example there is synthetic monitor and monitor failed due to one page doesn't load properly after clicking on a button in the previous page,after this step logout should be done and the logout option is there in previous page only where the button was clicked previously but this logout step is not done and monitor failed in the previous step where the page not loaded properly and the monitor didnt continue to the next step which is independent to the previous event.

justin_hogue
Dynatrace Advisor
Dynatrace Advisor

Hello,

I haven't tried this myself but you may be able to achieve this by using JavaScript events. Through the use of the JavaScript API you should have the ability to skip execution of events to create a dynamic workflow. I'll provide a link with documentation on this below.

https://www.dynatrace.com/support/help/shortlink/id_brower-clickpath-events#javascript-

Hope this helps!

HannahM
Dynatrace Leader
Dynatrace Leader

What would be the use case for this?

is it that you don't care about the results from some actions? If so, why are you testing them? As mentioned previously though you could add javaScript events to make the flow dynamic so that if you see a failure the script takes a different route.

If it's that you need to make sure a user gets logged out at the end of a session but also want to know that the action you tried failed, you might be better adding a check, at the beginning of the script, when you log in for the page that tells you if you already have a session open and then have conditional actions to deal with that.


Synthetic SME and community advocate.

Thanks Hannah,

In my case ,If a event is failed in the script ,after failure of that event I need to go to execute the next event and this event is independent of previous event So please may I know how could I execute it like how to use the java script for this to execute to the next event

If an event fails and fails the script - without validation forcing the failure - you won't be able to use this method as Browser Monitors cannot continue if they hit a 4xx or 5xx etc.

However, if you're failing due to validation or would usually use a locator in the next action to move on, you can use JavaScript events. You can find the documentation on JavaScript Events here.

If the event is failing due to validation, you will need to move the validation check out in to the JavaScript action. Like here if you don't see the text 'Information for parents' then skip the next event.

var content = document.documentElement.outerHTML;
var searchText = "Information for parents";

api.info(content.indexOf(searchText));
if (content.indexOf(searchText) > -1) {
    api.skipNextSyntheticEvent();
}

The same is for locators, you can check if locators exist before trying to click on them and then either perform the click in the JavaScript event or use the skip events calls to skip unnecessary events

var target1 = document.getElementById("cancelButton");
if (target1 !== null) {
    target1.click();
    api.info("--> found survey popup and clicked cancel");
} else {
    api.info("--> no popup");
}
Synthetic SME and community advocate.

Thanks Hannah,

In the synthetic browser click path if one of the event is failed due to content text validation ,then to execute to the next event with out failing the whole script as you said we can use java script but is there any possibility to mark that specifics event has failed with the error message (event which was failed due to validation ) and then execute to the next event , with out affecting the availability.If it so ,please let me know how to proceed.Thank you.

Hi Manish, unfortunately, it's not possible to fail an event and continue with the rest of the execution.
If they you would like to know the availability to each of the unrelated pages it might be better to have 2 separate monitors.

Synthetic SME and community advocate.

Featured Posts