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 / HTML ELEMENT CSS SELECTOR
Power Automate
Answered

HTML ELEMENT CSS SELECTOR

(0) ShareShare
ReportReport
Posted on by 36

Hi community,

I'm doing an automation that includes selection box of specific elements:

 

Element: <span class="v-checkbox v-select-option"><input type="checkbox" value="on" id="gwt-uid-175" tabindex="0"><label for="gwt-uid-175"><div class="tax-percentage-option group"><div class="floated-left name">ICMS</div><div class="floated-left country">Brasil</div><div class="floated-left type">Imposto</div><div class="floated-right percentage">5</div></div></label></span>

 

I did: span.v-checkbox.v-select-option:has(label div.tax-percentage-option.group div.floated-left.name:contains('ISS')):has(label div.tax-percentage-option.group div.floated-left.country:contains('Brasil')):has(label div.tax-percentage-option.group div.floated-left.type:contains('Retenção')):has(label div.tax-percentage-option.group div.floated-right.percentage:contains('%aliqiss%')) input[type="checkbox"][value="on"]

 

The problem is div.floated-right.percentage:contains(%aliqiss) o the contains makes it select elements that contain the value of the variable %aliqss%, for example, aliqiss=5, but it selects elements 4.5 5.5, because the contains opens this loophole. Is it possible to  div.floated-right.percentage = %aliqiss% and not "Contains"?

 

If anyone knows I would appreciate it, or if you have another solution I'm open.

 

29.PNG

I have the same question (0)
  • Gidi Profile Picture
    601 on at

    Hi contabilcomfica,

    you can try to do it with regex instead of concrete values. 

  • DeepaliJagtap Profile Picture
    68 on at

    Hey,

    You can try using '%aliqiss%%%' or '%aliqiss%'%% in your selector to select value 5% instead of values that contains 5 like you said 4.5 or so. using %% interpreted as % so try using it. 

    With this you can use equal to instead of contains.

    Please mark this as solution if it helps you solve issue. Happy to help you more.

    Thanks

  • contabilcomfica Profile Picture
    36 on at

    Hey!

    It doesn't work because the float doesn't have '%'

     

    Elemento: <span class="v-checkbox v-select-option"><input type="checkbox" value="on" id="gwt-uid-175" tabindex="0"><label for="gwt-uid-175"><div class="tax-percentage-option group"><div class="floated-left name">ICMS</div><div class="floated-left country">Brasil</div><div class="floated-left type">Imposto</div><div class="floated-right percentage">5</div></div></label> </extensão>

     

    Thank you for your intention!

     

  • contabilcomfica Profile Picture
    36 on at

    Hi!

     

    Can you be more exact please? I don't understand how to do REGEX in HTML

  • Verified answer
    contabilcomfica Profile Picture
    36 on at

    I managed to solve it, it was simple. I extracted the values ​​from the table as name, it generated a table, I look for the right tax within the table, when I look for the right tax I know the line number, then I just made a selector with the number of that line.

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 Automate

#1
11manish Profile Picture

11manish 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard