Capturing the last answer of the messenger


We need to capture the last answer in messenger , how are we going to achieve it.

Thanks in Advance

Sanjog Bahety


Hi @sanjog ,

Assume all the answers inside the A tag in your messenger.
Use find children activity to get all the elements, from there you can get the last element is your last answer from the messenger.



Thanks but just wanted to know how we can get last element in find children.
I want to capture each response of the question in Facebook messenger.

  1. I am using Find Children for which output is childElement having Variable Type as IEnumerable.

  2. I have used For each loop iterating between item and childElement.

Could you please let me know how to capture response in For each loop.



Hi @sanjog,

yes you will get IEnumerable output
use For each ->TypeArgument (UiPath.Core.UiElement)

inside for each use get text activity to get the data->pass Selector as item and get the output



Thanks for input. Do you have any demo which is somewhat related to it.
It would be very helpful.



HI @sanjog,

You can refer this post,



Thanks @ Arivu, It is working fine now …