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 / How can I click an ico...
Power Automate
Answered

How can I click an icon that matches certain conditions from a webpage?

(0) ShareShare
ReportReport
Posted on by 13

Hello,

 

Actually, I do not know much about HTML and CSS.. but I'd like to select icons ​​from data that is matched certain conditions from a webpage by using CSS selector.

For example, I want to click the square icon corresponding to the data which "Type" column is MCO.

Youngjam_0-1691381288342.png

 

selector of suqare icon:

#table > div.wux-layouts-collectionview.wux-controls-abstract.wux-layouts-datagridview.supportsCustomScrolling > div.wux-layouts-body > div > div.wux-scroller.wux-ui-is-rendered > div > div:nth-child(1) > div:nth-child(2) > div

Youngjam_0-1691382338502.png

 

 

selector of MCO:

#table > div.wux-layouts-collectionview.wux-controls-abstract.wux-layouts-datagridview.supportsCustomScrolling > div.wux-layouts-body > div > div.wux-scroller.wux-ui-is-rendered > div > div:nth-child(1) > div:nth-child(1) > div > span > a > img

Youngjam_2-1691381996671.png

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I would suggest using Extract data from web page to get the entire list and then using Find or replace in data table to find the row index of the text you are looking for (MCO in this case).

     

    Then you can use that row index to pass it onto the selector for the icon. It will likely be one of the <div> elements that you will need to use as div:eq(%Index%), but it's a bit hard to tell right now. The best way to figure out which part of your selector is the row element would be by capturing two different icons on two different rows and seeing which part of the two selectors are different.

     

    Once you have that, read this article on building custom selectors and passing variables to them: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors

    Also, watch this awesome video tutorial: https://www.youtube.com/watch?v=2PcyBa22Jj8

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    Hi @Youngjam 

     

    Instead of looking at the label, you need to look at the Icon what difference it has and pass the dynamic variable to that, so that It can click according the variable value you are passing

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Thanks,

    Srini

  • Verified answer
    Youngjam Profile Picture
    13 on at

    Thanks for your all solutions!! It was very helpful.

    I solved this issue to use Chrome Devtools >> find the element's iframe srouce >> pass the dynamic variable to PAD.

    Youngjam_0-1691995506835.png

    Youngjam_1-1691995623035.png

    Handle iframes on a web page - Power Automate | Microsoft Learn

    Cannot automate webpage with iframes - Power Automate | Microsoft Learn

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
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard