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 / UI elements didn't wor...
Power Automate
Unanswered

UI elements didn't work as I suppose

(1) ShareShare
ReportReport
Posted on by 12

I'm trying to to get data from my 😧 disk on a virtual machine. At first, i was able to use the recorder function in power automate desktop to capture the UI elements but when i tested it , it didn't work and get these error. I'm using Click UI element in window (right click action) on disk 😧 , Select menu option in window to select properties 

 

user19910221_0-1719883248524.png

 

This is the UI elements properties of the disk 😧 and properties

 

user19910221_1-1719884440339.png   user19910221_2-1719884511303.png

user19910221_3-1719884543283.png  user19910221_4-1719884590157.png

 

And these are errors, i aslo tried to repair the UI but it didn't work. The only time it work it when i first capture it and test it the first time, after that it failed and i had to capture the UI again for it to work. Somehow, it only run every time i first captured it .

 

user19910221_0-1719882209025.png

user19910221_1-1719882373098.png

user19910221_2-1719882587931.png

 

 

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @user19910221 

     

    Firstly, for the scenarios mentioned above, I would not recommend opting for UI-based automation as it sometimes not yields stable results. Instead, you could try using a PowerShell script to obtain the necessary parameters as properties.

     

    Please refer to the following code(It will return some basic info of your D drive):

    Deenuji_0-1719892295131.png

     

    Code:

    @@copilotGeneratedAction: 'False'
    Scripting.RunPowershellScript.RunPowershellScript Script: $'''# Get detailed information about the 😧 drive
    $driveLetter = \"D\"
    $driveInfo = Get-Volume -DriveLetter $driveLetter
    
    # Create a custom object to display the drive properties
    [PSCustomObject]@{
     Name = $driveInfo.DriveLetter
     FileSystem = $driveInfo.FileSystemLabel
     DriveType = $driveInfo.DriveType
     TotalSizeGB = \"{0:N2}\" -f ($driveInfo.Size / 1GB)
     FreeSpaceGB = \"{0:N2}\" -f ($driveInfo.SizeRemaining / 1GB)
     UsedSpaceGB = \"{0:N2}\" -f (($driveInfo.Size - $driveInfo.SizeRemaining) / 1GB)
     VolumeName = $driveInfo.FileSystemLabel
     SerialNumber = $driveInfo.FileSystemLabelSerialNumber
    }
    ''' ScriptOutput=> PowershellOutput

     

    How to copy/paste the above code into your Power automate desktop?

    Deenuji_1-1719892389700.gif


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • user19910221 Profile Picture
    12 on at

    Thanks you, it on my computer but now I have the same problem on a virtual machine that connect through Remote Desktop Connection. Any idea how to solve this ? I also tried to run the script you give me but it only work on my computer not on the virtual machine.

     

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @user19910221 

     

    Have you installed virtual machine agent for power automate desktop and installed the same exe in virtual machine?

     

    Please refer the below article - 

    https://learn.microsoft.com/en-us/power-automate/desktop-flows/virtual-desktops 

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • user19910221 Profile Picture
    12 on at

    Yes I have install power automate agent for virtual desktop, do the same thing like the topic above and add your solution in but it only read from my computer not from the virtual desktop. I'm still finding solutions on the web. If you have any solutions I would very grateful. Thank you a lot.

  • user19910221 Profile Picture
    12 on at

    Sorry I miss some info, I have install power automate agent for virtual desktop on the virtual machine and had it connected with my computer , it run perfect. I just can't show it because it is a server on my company.

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard