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 / Failing to get UI elem...
Power Automate
Unanswered

Failing to get UI element by variable

(0) ShareShare
ReportReport
Posted on by

I'm having difficulty getting PAD to click on a UI element when the element is named by variable instead of hard coded. Specifically I'm trying to click on a task in To Do (Windows app, not the web app). I know that my variable %TaskTitle% is set because I am already using it to create a new task earlier in the workflow, and I put a wait step in between to make sure the element is available before clicking it.

 

Works:

 

> window[Class="Windows.UI.Core.CoreWindow"][Name="Microsoft To Do"] > custom[Id="DetailAndTaskSplitView"] > list[Class="ListView"][Id="TodosListView"] > listitem[Class="ListViewItem"][Name="Task Remember the milk, more options available"]

 

Fails:

 

> window[Class="Windows.UI.Core.CoreWindow"][Name="Microsoft To Do"] > custom[Id="DetailAndTaskSplitView"] > list[Class="ListView"][Id="TodosListView"] > listitem[Class="ListViewItem"][Name="Task %TaskTitle%, more options available"]

 

 

Robin.Core.ActionException: Click failed (failed to get UI element)
at Robin.Modules.UIAutomation.Actions.ClickElementInWindow.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

I have the same question (0)
  • fraenK Profile Picture
    2,125 on at

    Are you using the latest version? 2.7.49.21099

    Is your variable of type string? Without any whitespaces?

    Does "contains" work, instead of equals?

  • Shrav Profile Picture
    Microsoft Employee on at

    @dsp_pepsi 
    1. use the latest version of PAD
    2. check and remove any leading and trailing whitespaces in the %TaskTitle%

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 247 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 164 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 138 Super User 2026 Season 2

Last 30 days Overall leaderboard