cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VgsBrazil
Helper I
Helper I

Click on a list of web elements in one action

Hi! im new in the Power automate, 

 

I have this problem:

I have previously saved  some web elements,

 

video1
video2
video3
video4

 

I should perform some actions, but they are the same as for all 4 elements, only the element changes.

How can I have a single action written in a loop for all 4?

 

The action simply wants to click on 4 videos in a youtube channel to listen some songs

 

Attached what I mean, thanks to those who will help me 🙂

 

Schermata 2022-06-20 alle 16.37.29.pngSchermata 2022-06-20 alle 16.37.33.pngSchermata 2022-06-20 alle 16.37.39.pngSchermata 2022-06-20 alle 16.37.46.png

12 REPLIES 12
ryule
Responsive Resident
Responsive Resident

Instead of clicking, could you use the "Go to web page" action....

 

So you'd put your 4 URLs in a list, loop through the list, putting %CurrentItem% as the URL variable...

Hi ryule, I know I can put url in a list, but  I need to click on the video1 element, video2 element, etc.. in the home page.. I have add the the screenshot with the element selected one of 4. Can you help me?

 

Schermata 2022-06-20 alle 22.10.40.png

 

 

ryule
Responsive Resident
Responsive Resident

Yeah, I couldn't think of a way to do this by performing a physical click, so that was my only workaround idea. Sorry!

Ankesh_49
Super User
Super User

@VgsBrazil Could you please try using SendKeys {Tab}{Return}.

Thanks
Ankesh

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Maybe I explained myself wrong, how can I assign a variable to the web element "video1" "video2" etc?

ryule
Responsive Resident
Responsive Resident

You can put the web element in just a basic variable, and then reference it in the Selector Builder (ensure you toggle). Perhaps you could give that a try? 

 

ryule_1-1655757433259.png

 

VgsBrazil
Helper I
Helper I

I don't know how I can do it, can you explain? thanks 

Ankesh_49
Super User
Super User

@VgsBrazil I believe you are looking for Dynamic Selector.

To do that please follow the steps below:

OR

 

@VgsBrazil Refer this video: https://www.youtube.com/watch?v=AbjkdHDN9fw

Hope it helps!


Thanks
Ankesh

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Henrik_M
Super User
Super User

Follow these steps:

  1. Modify your UI element selector so there aren't any unique attributes at the end of the chain.
  2. Experiment with adding the Ordinal filter to the video element and ensure that ... video:eq(0) selects the first video, ... video:eq(1) selects the second, and so on.
  3. Add a loop action in your code.
  4. Use the %LoopIndex% variable in your ordinal selector, instead of the "test integers" from step 2.
  5. Remember to switch your Visual editor / Custom selector toggle to the left.
  6. Test.

Note: you will probably want to instead Get details the href attributes from either an anchor element on the video or the video element itself, and then open each of those URLs in sequence, in order to do whatever it is you want.

 

Hi Henrik, maybe surely that's what I'm looking for, unfortunately technically I can't figure out how to make it. Do you have an example file you can see?

Ankesh_49
Super User
Super User

Hi, this is video made by me now for explain what I want automate, for every video i want see 1-2 minutes then go to the video, 2 then go to video 3 etc.. for 50 videos

 

VIDEO:

https://youtu.be/Jiy0Ey1VfsU 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Top Solution Authors
Top Kudoed Authors
Users online (3,491)