cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
terramorphous
Advocate II
Advocate II

Error - Press Button on a webpage

hello everyone,

 

I've got a Problem with mit Power Automate Desktop Workflow. In my example, I want to download a video from Microsoft Stream. To do this, I need to press two buttons on the web page. Both are not recognized in the workflow with my CSS Selector, but are recognized in the browser console.

 

This is the CSS Selector which I use to click on the download button:

button.drawer-item-download-button

terramorphous_0-1646729388559.png

This allows me to find the button uniquely in the Console.

 

This is a part of my current Workflow:

terramorphous_1-1646729514996.png

 

Three - four weeks ago the button could be found on the website and the workflow ran without errors.

 

Also I tried to execute Javascript on the web page. That doesn't work for me either, even a ConsoleLog doesn't get through. How can I get Javascript to work?

 

Thanks a lot for your help!

Fabian

8 REPLIES 8
Guriga
Advocate II
Advocate II

Hi,

 

I know it's not the best solution but did you try for testing: Move mouse to image and left click?

terramorphous
Advocate II
Advocate II

Yes, I already tried that and it worked, but I don't want to be dependent on screen size or screen resolution.

Understandable.

I tried this and it's working for me.

 

Guriga_0-1646737202143.png

Guriga_1-1646737219502.png

 

terramorphous
Advocate II
Advocate II

I tried your solution, but it fails for me too. It shows the following error:
Click failed (error retrieving the UI element).

 

terramorphous_0-1646747065260.png

 

Did you customize anything within the UI element (Selector generator)?

 

terramorphous_1-1646747142054.png

 

Thanks a lot for your help!

No, I didn't make any changes.

> pane[Class="BrowserRootView"][Name="Watch 'KN (CS) - Individual Consultation Meeting Placeholder ' | Microsoft Stream - Microsoft Edge - Work"] > pane[Class="NonClientView"][Name="Microsoft Edge"] > pane[Class="GlassBrowserFrameView"] > pane[Class="BrowserView"] > pane[Class="View"]:eq(2) > pane[Class="View"] > pane[Class="View"] > document > group[Class="ms-Fabric--isFocusHidden -mouse -should -not -have -outline theme-for-videopage"] > group[Class="office-scroll-body"] > group > group[Class="other-area ng-scope"][Name="section including comments and related videos"] > group[Class="ng-isolate-scope"] > group > group:eq(0) > menu[Class="c-action-trigger c-glyph drawer-button drawer-button-stream drawer-button-without-label ng-isolate-scope"][Name="More actions"]

Guriga_0-1646747804908.png

 

I tested with Edge.

 

terramorphous
Advocate II
Advocate II

I found out that the loop that calls the links is the problem. Unfortunately, I don't have a solution for it yet.

 

I have built the workflow like you without the loop. Here is the problem: I created the UI elements from the browser of video 1. If I call video 1 with the workflow, the workflow runs without any problems. If I call another link from for example video 2, the workflow doesn't find the UI elements anymore and fails.

 

I have tested it with different browsers.

Guriga
Advocate II
Advocate II

Did you try adding the video1 link for the second loop section? For testing.

 

terramorphous
Advocate II
Advocate II

I replaced the link with a fixed value of Video 1 instead of using the CurrentItem from the loop.

terramorphous_0-1646821509720.png

 

 

The workflow also went through without error. By calling different videos in the loop, the UI elements can then not be found. That's why I had used CSS selector, because that should be the same on every page. But that also fails since a few weeks.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,181)