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 Apps / Programatically select...
Power Apps
Unanswered

Programatically select a control nested within gallery

(0) ShareShare
ReportReport
Posted on by 25

I am writing tests in Test Studio for a canvas app. My app contains a gallery with structure something like gallery -> container -> iconButton, as shown below:

Donn_1-1673958623189.png

 

When user clicks the icon, it deletes the selected row in the gallery. This works fine when I do it manually, but now I'm trying to write a test to do the same thing. The problem is how to select the icon. I have tried the following without success:

  • Select(gal_Strathouses_HIS, 1, icn_StrathouseDelete_HIS) //Error: The function 'Select' has some invalid arguments.
  • Select(con_StrathouseItem_HIS, 1, icn_StrathouseDelete_HIS) //Name isn't valid. '{0}' isn't recognized.
  • Select(Select(gal_Strathouses_HIS, 1), icn_StrathouseDelete_HIS) //Invalid argument type (Boolean). Expecting a Control value instead.
  • Select(gal_Strathouses_HIS, 1, Select(con_StrathouseItem_HIS, icn_StrathouseDelete_HIS)) //Invalid argument type (Boolean). Expecting a Control value instead.

Any ideas?

 

 
 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,117 Most Valuable Professional on at

    Hi @Donn ,

    If you are asking whether you can refer to Control names dynamically, then unfortunately, the answer is no.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • clairewu0218 Profile Picture
    Microsoft Employee on at

    Hi Donn,

     

    I'm afraid that components and code components written in the Power Apps Component Framework are known limitations to Test Studio. More details can be found here: Test Studio - Power Apps | Microsoft Learn

     

    Best,

    Claire

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard