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 / edit combobox ui eleme...
Power Automate
Unanswered

edit combobox ui element in web automation

(0) ShareShare
ReportReport
Posted on by 23

Hi All,

 

how can I define UI Element for specific data? TThat is, I needed my automation to always run today and the day before. Example selecting today's date and then selecting yesterday's date at separate times.

Chaile90_0-1628620501257.png

I tried to make a recording to define user interface element, the problem is that it recognizes image and I wanted it to recognize the date as a variable so I can manipulate

 

Chaile90_1-1628620773029.png

 

 

 

 

 

 

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    So, if you are using the recorder, then there is a selector switch in the top right for image based or UI based recording, but I don't think that's your case.

     

    During "Capture UI element", you get the UI selectors.  It also saves an image, not because that is what it is using, but it's for you, the developer, to know what that is supposed to be clicking.  The photo doesn't actually have an impact on the bot if you are using selectors.

     

    With that said, I think your best bet will be to "Move Mouse to text on screen (OCR)."  Use the date as the "Text to find variable" (make sure it is formatted correctly M/d/yyyy).  Under Advanced, use "Send a mouse click after moving mouse" and "mouse position relative to text"...my guess is "Left" Offset X "-15" or so; you can play around with it until it works, but the idea is "find the date and click the box on the left."

     

    Good luck.

  • tkuehara Profile Picture
    667 on at

    Hi @Chaile90 

     

    It depends on your page code. If you could provide more info about those elements we might be able to help you better.

    In any case, to edit an element, you toggle to custom at the "Selector builder" window:

    tkuehara_1-1628722660203.png

    Here you can edit the selector as you wish:

    tkuehara_0-1628722603538.png

     

  • Chaile90 Profile Picture
    23 on at

    Hi, @tkuehara and all. Thanks everyone for your precious time and help.

     

    My RPA downloads files from a sharepoint site. My difficulty is in editing the selector so I can manipulate the date filter and download data with today's date for example. I tryed to custom at the "Selector builder" window. But I have a lot of text and HTML code that I can't understand how it works to fetch the date.

     

    Chaile90_0-1628854085790.png

     

    Chaile90_1-1628854239742.png

     

  • Chaile90 Profile Picture
    23 on at

    Hi @MichaelAnnis thanks for you solution.

     

    I'm, tryed to use "Move Mouse to text on screen (OCR)." to find the data on screen. But didint work. 

     

    I have the following error: Could not find text in 10 seconds

     

    Chaile90_1-1628847750996.png

     

    See my flow in the image:

    Chaile90_0-1628847440805.png

     

    I tryed to use Extract text on OCR to test if working but the "Demo.txt" the demo file is always empty. Do you know what I'm doing wrong?

     

    Many thanks for your help and precious time

    Chaile

     

  • tkuehara Profile Picture
    667 on at

    Hi @Chaile90 

     

    From what I can see, the selector presented on the print screen is the label one (text value). All you need to do is the following:

    1. Map the checkbox element
    2. Change the selectors (both label and checkbox) to a dynamic approach
    3. Count the rows
    4. Iterate them
    5. Set checkbox state accordingly

    Example:

    Selectors

    Dynamic selectors - make sure you have the same number of elements of both itemsDynamic selectors - make sure you have the same number of elements of both items

    JS

    Please notice this is a sample: at the querySelectorAll, update with your checkboxes pathPlease notice this is a sample: at the querySelectorAll, update with your checkboxes path

    Sample flow

    Sample flow with commentsSample flow with comments

    Result

    The flow selects the checkbox with the current dateThe flow selects the checkbox with the current date

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Create the tesseract engine first with a multiplier of 3 x 3.  This will essentially zoom in on the text to increase the accuracy.  You can always write OCR text to clipboard and paste into notepad or something so you can see what it is reading and increase your multipliers if it is reading something wrong.  The higher your multipliers are, the longer it takes to scan the screen, but the more accurate it is.

  • Chaile90 Profile Picture
    23 on at

    Hi @tkuehara many thanks for your help.

     

    I tried to perform your procedure, but I have error to convert text to number, my variable Result returns text "undefined"

     

    Chaile90_0-1629113849813.png

    That is my JS code:

    Chaile90_1-1629113888837.png

     

  • tkuehara Profile Picture
    667 on at

    Hi @Chaile90 

     

    Undefined means the JS couldn't find the elements. You need to:

    1. Identify whether the website uses an iframe or not
    2. Identify the element path

    You probably mapped the combobox element (I saw the prints to the combobox label) already. Could you please provide the path here? From what I could see in the label path, the website doesn't seem to use iframes (which makes things easier).

  • Chaile90 Profile Picture
    23 on at

    Hi @tkuehara 

    I'm not sure what path do you want. that's it?

     

    Chaile90_2-1629120201010.png

     

     

    Chaile90_1-1629120076373.png

     

     

    div[Id="appRoot"] > div[Class="Files-hostContainer"] > div > div[Class="od-OverlayHost"] > div[Class="od-OverlayHost-overlay od-OverlayHost-overlay--opened"] > div[Class="od-OverlayHost-content"] > div[Class="od-Panel od-Panel--sm od-Panel--autoScroll od-Panel--hasPadding"] > div[Class="od-Panel-content"] > div > div[Class="od-FilterSelect-panel"] > div[Class="od-FilterSelect-region-wcag"] > div[Class="od-FilterSelect-scrollRegion"] > div[Class="od-FilterSelect-filterSection FiltersPane-section"] > div[Class="FiltersPane-sectionContent"] > div[Class="ms-FocusZone css-74"] > div[Class="ComposedCheckbox is-inFocus"] > div[Class="ms-TooltipHost root-119"] > div[Class="ms-Checkbox is-checked is-enabled ComposedCheckbox-checkBox root-256"] > label[Class="ms-Checkbox-label label-200"] > span[Class="ms-Checkbox-text text-203"]

     

  • tkuehara Profile Picture
    667 on at

    Hi @Chaile90 

     

    I don't know what is the exact website structure, but it should look something like this:

    • Selector for the checkbox label (span, label, div, etc types)

    tkuehara_0-1629121092851.png

     

    • Selector for the checkbox element itself (input type)

    tkuehara_1-1629121135068.png

    Please provide the checkbox element selector.

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 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard