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 do I create a cust...
Power Automate
Unanswered

How do I create a custom selector from a div?

(0) ShareShare
ReportReport
Posted on by 23

I want to reference text from this div: 

 

<div class="markdown leading-normal"><b>Name:</b><br>
Charles<br>
<br>
<b>Email:</b><br>
charles@yahoo.com<br>
<br>
</div>

 

PAD is able to reference 'Name' and 'Email' as:

 

div[Id="acme"] > div[Class="flex min-h-screen"] > div[Class="content"] > div[Class="px-view py-view mx-auto"] > div[Class="relative"] > div[Class="mb-8"]:eq(0) > div > div[Class="card mb-6 py-3 px-6"] > div[Class="flex border-b border-40 -mx-6 px-6 remove-bottom-border"] > div[Class="w-3/4 py-4 break-words"] > div > div[Class="markdown leading-normal"] > b:eq(0)

 

('Name' is eq(0) and 'Email' is eq (1) ). 

==============================

 

Since PAD skips 'Charles' and 'charles@yahoo.com', they're not listed as integers for eq(). Therefore, I need to find another way to reference them.  


How do I do that? When I Inspect 'Charles', it says #text 68x27 - so I was thinking I could reference the #text somehow?

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    div[class="markdown leading-normal"]:contains("Name:") should give you a selector for the div containing the full text.

     

     

  • ele2 Profile Picture
    23 on at

    Hi @Henrik_M, referencing the full text gives me: "Name", "Charles", "Email:" and "charles@yahoo.com"  as one value however. 

    I am trying to get each term as it's own separate value, if that makes sense. Thanks.

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Since the two parts of the text are not contained in their own elements, I don't think it is possible.

    Pull out the div, then regex parse to get the two values 🙂

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 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard