How can I iterate through Facebook Business Chat and check for label before sending message

Hi everyone!

I would like some guidance on how to click through each of the chats, check if the chat has been tagged with “Followed”, and if it is NOT then send a message (please see attachment for reference).

Any help is greatly appreciated.

Talk soon,
Termita

1 Like

Hey @Termita,

Fetch the selector for a single chat & use idx attribute to loop and go through the chats one by one.

Check if label is found by means of Element Exists and then store it somewhere.

Thanks :slight_smile:

1 Like

Thank you so much for your reply. I’ll be trying this shortly and let you know how it goes.

1 Like

Could you please elaborate a bit more on “Fetch the selector for a single chat & use idx attribute to loop and go through the chats one by one”, please?

UIpath is not assigning an idx :frowning:

1 Like

Update: How do I iterate/loop through the idx?

1 Like

Could you please attach the screenshot of UiExplorer with the selector.

Thanks :slight_smile:

1 Like

I was able to find it. TYVM for the help. I really appreciate it.

Any tips on what to do once the ‘Next’ chat is out of view? idx doenst work unless visibly seems like.

1 Like

Repeat from value 1 :slight_smile:

1 Like

What I meant is I need to scroll down on that chat view (which doesn’t have any scroll down arrow button or anything)

1 Like

Find the keyboard key for scroll it should be either pagedown or down arrow.

Once you find that, you can just use send hotkey activity & automate :slight_smile:

1 Like

Also, I just noticed that whenever I scroll, the top one chat now becomes idx=1 :frowning:
so they all repeat after idx 10

1 Like

Yes, you are right. Scroll it through and then repeat from 1

Hope this helps :slight_smile:

1 Like

Any tips on how to scroll?

@Termita, You can try as suggested above.

1 Like

Thanks. I tried that alrady BUT that part of the website doesn’t take any keyboard input (i tried them all).

Do you have any other tips/suggestions?

Please check for any scroll button control available.

Thanks

1 Like

There iis none either, other than the scroll bar (without ^ or down buttons)

1 Like

@Termita, Did you tried send hotkey activity.

Indicate the chat div element and check send window messages as true.

Thanks :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.