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 / Find and click a speci...
Power Automate
Unanswered

Find and click a specific value in a selector?

(0) ShareShare
ReportReport
Posted on by 17

In my search box, I entered “200”. The class="quickSearchTable" returns three values. I need to find and click on the value that equals Luxemburg-Casco.

I am using %CurrentItem[‘ID’]%  as the value entered in the customer dropdown (ctl00_body_RadComboBox16_DropDown)

I am using%CurrentItem[‘Name’]% as the value I need to find within the search results.

Please note I hid the full phone number values in the screenshot and the html code below.

 

Thank you for any assistance you may be able to provide. Based on my limited experience with PAD, other solutions I have tried will select the incorrect value when there is more than one result.

dsmith2006_0-1677507796342.png

 

This is my html:

<div id="ctl00_body_RadComboBox16_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display: block; width: 773px; visibility: visible; top: 0px; left: 0px;"><div id="ctl00_body_RadComboBox16_Header" class="rcbHeader"><table cellpadding="0" cellspacing="0" style="text-align: left;  table-layout: fixed; padding: 0px !important; width: 750px;"><tbody><tr><td style="width: 150px; padding: 0px !important;"><span>Name</span></td><td style="width: 3px; padding: 0px !important"></td><td style="width: 150px; padding: 0px !important;"><span>Type</span></td><td style="width: 3px; padding: 0px !important"></td><td style="width: 150px; padding: 0px !important;"><span>ID</span></td><td style="width: 3px; padding: 0px !important"></td><td style="width: 150px; padding: 0px !important;"><span>Preferred Phone Number</span></td><td style="width: 3px; padding: 0px !important"></td><td style="width: 150px; padding: 0px !important;"><span>Primary Organization/Company Name</span></td><td style="width: 3px; padding: 0px !important"></td></tr></tbody></table></div><div class="rcbScroll rcbWidth" style="height:200px;width:100%;"><ul class="rcbList"><li class="rcbItem  rcbTemplate"><table cellpadding="0" cellspacing="0" class="quickSearchTable" style="width: 750 px;">

                <tbody><tr>

                                <td style="width: 150px; padding: 0px !important;"><span>2001 Company</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>Organization</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>1791</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>(203) </span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span></span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                </tr>

</tbody></table>

</li><li class="rcbHovered  rcbTemplate"><table cellpadding="0" cellspacing="0" class="quickSearchTable" style="width: 750 px;">

                <tbody><tr>

                                <td style="width: 150px; padding: 0px !important;"><span>Luxemburg-Casco</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>Organization</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>200</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>(920) </span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span></span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                </tr>

</tbody></table>

</li><li class="rcbItem  rcbTemplate"><table cellpadding="0" cellspacing="0" class="quickSearchTable" style="width: 750 px;">

                <tbody><tr>

                                <td style="width: 150px; padding: 0px !important;"><span>Cynthia Vondrasek</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>Individual</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>200</span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span>(608) </span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                                <td style="width: 150px; padding: 0px !important;"><span></span></td>

                                <td style="width: 3px; padding: 0px !important"></td>

                </tr>

</tbody></table>

I have the same question (0)
  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Hello,

     

    There might be a more intristic problem to the flow, which is as you described multiple '200' values. (why do 2 entities have the same customer ID?)

     

    Can you put more filters on the field for example: only organizations? This way only 200 of Luxemburg-Casco will show up. Else you are probably trying to solve something that is wrong within your data structures which is a no go in my opinion.

     

    Good Luck.

  • dsmith2006 Profile Picture
    17 on at

    Two different entity types having the same ID is a flaw in the database we are using. We hope to be done with this system and on to a better one by this time next year. In the meantime, I have a lot to learn and get through. 

    I have attempted using ctrl[f]%currentitem['Name']%. The browser "find box" does not open on the page. If it did, I am not sure how I would send a left click to the found Name.

  • Community Power Platform Member Profile Picture
    on at

    hi,

    First of all, it is important to know which value you have to click on...is it "Luxemburg-Casco" that you always want to click on ....or it can be something else next time....

    Please try to use extract data from web page action to get all the data in data table and then use for each loop to click on the items where ID is 200 and Name is "Luxemburg-Casco"... if you just want to click on first, then click on the first one and next action should be "Exit Loop" which take you out of the loop..

    if that does not work, i can see that it is giving you "showing 1-3" from where you can get maximum result in the result set, you can use loop action to iterate of the over the items in the result set, based on the index, you can try to use get details of element action to get the Name and then based on name and id, you can click on it....

     

    hope it works for you....

  • dsmith2006 Profile Picture
    17 on at

    It will be something else next time. I have been working/learning how the extract data from web page action works. 

  • dsmith2006 Profile Picture
    17 on at

    @Anonymous I am slow, but making significant progress. I have found the correct record but am not figuring out how to click on it. Sometimes it will be the 1st position as it is, in this case, other times, it could be in the 2nd, 3rd, or 4th place. I don't usually get more than 4 records when I narrow the filter based on the input entered into Class=ctl00_body_RadComboBox16_DropDown.

     

    FYI: this is not the same as the example above, but it is the same problem and process.
    I am so grateful for your assistance.

    dsmith2006_0-1677767945758.pngdsmith2006_1-1677768207140.png

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @dsmith2006 ,

     

    Is there any specific reason why you are using Send mouse click action instead of "Click link on web page action" and line number 17 of the screenshot....is this logical comparison really working...

     

    I would recommend using click link on web page action to click on web page, even if it is not link.

    your logical comparison in my opinion should be something like below

    InzmamUl_0-1677809880043.png

    Further, i noticed that your using hard coded wait....please use wait for web page content action to wait dynamically...

     

    Hope it helps.............

  • dsmith2006 Profile Picture
    17 on at

    @Anonymous Thank you. 
    I was assuming that since this is not a hyperlink, it would not work. My code for the if statement may have only been working because it was the first item in the list. Your solution makes perfect sense. I am using the hard-coded wait to allow me to run to the point where I want to click through each step. It gives me time to take control of the mouse to click pause. 
    When using the "Click link on web page," I think I need to use the variable %Currentitem2%. That is what I want to click on. I have edited the "Div 'K12 by Elio ... 432(608) 537-2083'

    dsmith2006_0-1677842596810.png

    CurrentItem2 is the correct selection:

    dsmith2006_1-1677843893208.png

    But the "Click link on web page," is not clicking on currentItem2. I am sure there is something I do not understand or missing.

  • dsmith2006 Profile Picture
    17 on at

    @Anonymous I keep plugging away at this and have made significant progress. After using the "extract data from web page" action, I used the "Get details of element on web page" action to get the attribute 'waelementrectangel.' In my next step, I split this attribute, converted the text to numbers, and added each number to the new list. I then assign the X coordinate and the Y coordinate to variables.  

    It is these two variables I need to use for sending my mouse clicks. The location will likely change for each row of my excel data. Is there a special syntax to use for pulling in the variables? 





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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard