How to share a post in facebook groups?

Hello guys, I’m new to UIpath so I’m lost now. I’m trying to automate on how to share to facebook groups. I have 50 groups and Facebook doesn’t have the feature to share a post to all your groups in 1 click, so you need to do it manually one by one.

The problem when I came to this dialog box

I want to share a facebook post to the first 6 groups(WITH YELLOW BOX) on that list and scroll down after to show another 6 groups until I’m done sharing with my 50 groups.

But this vertical scroll bar is always hidden(WITH RED BOX). I tried sending hotkey like pgdn or the down arrow key but it only works with mouse.

What I’ve tried:
1.To solve the vertical scroll bar, I used hover activity to a name on that list and put an imgeexist activity to check if the scroll bar showed up after the hover activity. It worked. But I can’t control the scroll down to show another 6 groups.

Hi @lelouch ,

You can use a delay activity before hotkey. If this doesn’t work then use an attach browser , indicate on that page and then delay + hotkey accordingly.

Regards,
Nirmalya

Hi @lelouch , @nirmalya.sarkar

Please check out this forum post.

Hi Nirmalya,

You can use a delay activity before hotkey. If this doesn’t work then use an attach browser , indicate on that page and then delay + hotkey accordingly.

I tried to use the hotkeys outside UiPath, it doesn’t work. The vertical scroll bar only works if you hover over the mouse to that side or hover over a name of a group.

I appreciate any ideas that can solve my problem, thanks.

Best regards,
Lelouch

Hi lelouch,

Like u said the hotkey works when u hover over a group, so before sending hotkey make a generic selector of “Hover” activity that can hover to any group despite the name of group which we can omit in this case after this try sending hotkey

Hope it works

Regards,
Shaf

Hi Shaf,
My bad here.

What I mean here is that neither the pgdn nor the down arrow key works. The vertical scroll bar only works with the mouse.

I hope I made myself clearer now. I’m sorry for causing confusion. I can’t see any edit option to edit my post.

Thanks!

Best regards,
Lelouch

So I tried and figured that after 4 Tabs the Pgdn hotkey is working
Check out the attached file
Hope it helps

Tab_Scroll.xaml (11.2 KB)

Regards,
Shaf

Hello GreenTea,

Thanks for the suggestion. I was about to post that it’s not working but I got it working now.
The trick is to hover over the element that holds the item that you want to scroll.

Anyway, Thanks a lot! cheers!

Now time to solve the second dilemma.

Best regards,
Lelouch

Hi Shaf,

This is great! I didn’t thought about it. I’m too occupied by that vertical scroll bar :sweat_smile:
Anyway, I’m thinking about putting this is in a loop so every time the tab selected the name of the group it will automatically click it to open the “create post dialog box” Because I have 50 groups to share with.

Anymore suggestions? but this is already a good trick. Thanks a lot!

Best regards,
lelouch

I couldn’t think more better then this trick :smiley:
and yeah it will work good in loop another think is, try to put some seconds-delay bcz after 10 to 15 groups (already loaded in groups div) and when bot will send hotkey of “Pgdn” it will refresh and load other groups and we don’t want to miss any “Tab” hotkey

Happy Automation…!

Regards,
Shaf

we don’t want to miss any “Tab” hotkey

@SHAF_MAIRAJ well said! thanks a lot!
If you can think of another efficient way to do this just keep it coming, so other people can find the better solution here.

I’ll keep this thread open for now until I managed to post to my 50 groups with no errors.

Back to working mode :sunglasses: Thanks again @SHAF_MAIRAJ

1 Like

Hi @lelouch

To add on to @SHAF_MAIRAJ ideas, you may want to experiment with find children activity with scope for FIND_CHILDREN or FIND_DESCENDANTS. It has start from a parent level that shows all the groups. The output of find children activity is List of UiElement where you could count the number of groups. Thus making it less reliant on screen size or N number of groups displayed on UI viewport.

Hi @GreenTea
This process I once tried, but “Find Children” throws error as it couldn’t able to find the element which is yet to be load, only showing the count of available/shown elements
Can u please provide a demo or something ?

Thanks,
Shaf

Hi @SHAF_MAIRAJ

The add-on idea is to surround the find children activity in a try-catch block activity. Find children just need to count the number of elements.

After each page down or mouse scroll
In try section, if number of elements is lesser than the default of 6 groups within the viewport then we know it has reach the end.
In the catch section, if number of elements is zero, assuming the UI shows empty then we also knows it has reach the end.

This makes sense and can save us from looping infinite

Thanks @GreenTea

I got it working now. I just finished sharing to 97 group and it took me an hour

image

the idea by @SHAF_MAIRAJ was really the good starting point.

I put the tab key in a loop just like what my idea above, to act as a selector. But the problem was it’s taking a second to hit the tab key. So If I need to tab 5 times it’ll took 5 sec which is a problem if you have a lot of groups.

And then I found these

That led me to this

image

Which made the pressing of the tab a lot way faster.

Although there is a lot of polishing needed to make my flow more efficient and time saver. Thanks a lot, guys!

1 Like

Hi @GreenTea

Thanks for the idea. I’m still learning and I’m still having troubles with selectors specially in dynamic websites, that’s why I don’t know how to incorporate your idea to mine.

You explained it well but I just don’t know where to start it. Hope you understand :sweat_smile:

Anyway, thanks a lot!

Regards,
lelouch

Hi @lelouch

This is awesome and thanks to ur searching skill
By this trick we can surely save alot of time

Regards,
Shaf

1 Like

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