web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Problem: old UI-elemen...
Power Automate
Answered

Problem: old UI-elements being used

(0) ShareShare
ReportReport
Posted on by 40

Hi,

Update: I managed to get this to work by manually moving mouse, but when running the flow again, even after changing the desktop resolution to the same resolution as when the flow was created (1920 x 1080, and now scaling etc), the mouse pointer is still off when it moves (about a 200 px X-axis and 100 px Y-axis). Does anyone have any good explanation for this? To me this doesn't make sense.

I have a very repetitive task that I would like to create a flow for that I can re-use.

What is it? It's a UI flow that runs, goes into a specific web-url, changes a bunch of settings and then finishes.
This is useful because this is a learning management system and the flow goes into a course, presses some settings, types in text and this can (at least in theory) be used on any course as long as I give the url to the settings page and start from there.

The problem: when I enter a different course URL than the one i used to record the flow, the flow stops already at the first "Click UI-element". When I investigate, I can see that the name from UI-elements are from the original I used to record.

Here in the settings you can see that the "Window 'Test course'...." is the one I want to use that has a completely different name.

RobinA_0-1648718799652.png

 

How do I fix this so? Any ideas?

Really appreciate the help

Best regards,
Robin


I have the same question (0)
  • mattias1172 Profile Picture
    on at

    You may need to change the selectors for the page in the advanced screen. Click on the UI Elements link on the far right side, find the element, click the ... and click edit, click edit again, and check the selectors. It sounds like the element names between each course may be different. 

     

    mattias1172_0-1648756704327.png

    mattias1172_1-1648756716637.png

    mattias1172_2-1648756734588.png

    mattias1172_3-1648756763167.png

     

     

  • RobinA Profile Picture
    40 on at

    Hi!

    Thanks so much for explaining this, I didn't know that you could change these. The problem is, however, that this is the kind of process you do once (settings for each course) and then you're done. Am I understanding this right that UI-automations (at least in my case) will be hard to re-use?

    I managed to find something that works though. That's making the mouse go to pixel X, left klick, send keys from the keyboard etc. The problem with this solution however, is that it tied to the resolution to the screen and might behave differently on different setups.

    May I ask how you would go about this?

    Regards,
    Robin

  • mattias1172 Profile Picture
    on at

    PAD flows are really good at doing repetitive tasks. When you start to add inconsistency or change, that's when it gets less reliable and more difficult. 

     

    In your case, the way the website is coded adds this change by the backend data changing between each course. PAD is not great at handling this automatically. 

     

    Moving the mouse and sending a click can temporarily solve this as you have seen, but should a ui element be moved on the screen or the resolution change, the flow will likely fail. There isn't much you can do about the website changing. For the resolution, you can refer to this document to force set the resolution: Set screen resolution on unattended mode - Power Automate | Microsoft Docs

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    You might also try using an image instead of Pixel. 

    I've found using the Advanced algorithm with a tolerance of 15 has been reliable across resolution changes.

  • VJR Profile Picture
    7,635 on at

    Haven't tried this but there is also an action called as "Set screen resolution".

    Maybe you can first set the desired resolution at the beginning of the flow.

    https://docs.microsoft.com/en-in/power-automate/desktop-flows/actions-reference/workstation#setscreenresolution

     

    And another feature related to resolution looks to be in Aug 2022.

  • RobinA Profile Picture
    40 on at

    I truly appreciate your feedback, help and explanation as I'm learning how to use PAD.

    This explains this well. Thank you so much.


  • RobinA Profile Picture
    40 on at

    Image? I have not come across this option. Would you mind linking it? 

    Robin

  • RobinA Profile Picture
    40 on at

    This is a great idea, and it should make the flow more consistent. I mean, if the two screens support 1980 x 1080, and if the flow always sets screen resolution to 1980 x 1080 when running, then the "move mouse to x, y pxl" should work every time?

  • RobinA Profile Picture
    40 on at

    Hi again,

    I tried this, but the mouse is still off even when using the same resolution as when the original flow was created.  I updated my post with this information if you would like to have a look.

    Regards

    Robin

  • Verified answer
    ryule Profile Picture
    929 Super User 2024 Season 1 on at

    ryule_0-1649161930827.png

    ryule_1-1649162084649.png

     

    Within that, you can "send click" and change different settings on how it finds the images (yellow highlights above). I've also found that you need to add a 3-5 seconds of wait time right before this step.

     

    And for the record, I have not had success using the set screen resolution step on unattended bots.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard