web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HTML ELEMENT CSS SELECTOR
Power Automate
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard