Capturing the last answer of the messenger


#1

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

Thanks in Advance

Sanjog Bahety


#2

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.

Regards,
Arivu


#3

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.

Regards,
Sanjog


#4

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

Regards,
Arivu


#5

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

Regards,
Sanjog


#6

HI @sanjog,

You can refer this post,

Regards,
Arivu


#7

Thanks @ Arivu, It is working fine now …