How to keep more than one Event Monitors in single Sequence?

Idea here is to keep multiple event monitors in single Sequence. And based upon relevant action respective handler will react.

For an example:
Sequence “Test” Contains : 1. Event Monitor who is listening for some Button Click operation
2. Event Monitor who is listening for some Image Click operation
Expectation here is : Based on action performed (Button/Image click), It’s respective handler should get invoked.

Note : Tried above use case with Sample application, but only first Event Monitor is getting invoked.

Please provide your suggestions.

1 Like

Hi Vibhav,

The Monitor Events container can hold multiple trigger events. If you have been able to record or create one of the user events. (assuming a click on a button), you would find it in a container Monitor Events. You can drop another trigger event (say click Image trigger) in parallel to your Click trigger activity on your first button.

Refer to the below image. Hope this helps.


Tejus V

I don’t think that answers the question, which is that each trigger should have a different handler.

@vaibhav.diwate - can you try setting multiple MonitorEvents inside Parallel scope?

1 Like

I think this can still be achieved without a parallel. The Get Source Element activity under Event Handler scope can tell me which of the element triggered the action.

It can, but in that situation you will have to add a branching there depending on which one is it and readability will go south. Also it will always return an UiElement, which for multiple image click triggers may be very hard to distinguish.
Using a parallel construct, you can have clear execution path visibility.

Please also note that for hotkey triggers, source element will be null as far as I know (and there could be multiple hotkeys for different actions).

Of course it all depends on what should happen for each of them, but still there’s always more than one way to achieve things.


1 Like

Hi- I have a question which is extension to the above one- If I have to perform multiple event handlers in a single xaml for a FOR /assisted bot is possible.

Lets say on one click -open the browser and on another click get the data from the app, and on another click set the data into an app. Is it possible to configure multiple monitor activities with in a single flow chart/sequence ? Please let me know the options?