UiPath: How to select non‑standard dropdown item based on DataRow value?

Hi,

I’m automating a legacy web application using UiPath, and I’m having trouble interacting with a dropdown field. The dropdown appears to be built using JavaScript, and although it looks like a standard <select> element, none of the usual activities are working:

  • Select Item throws an error or doesn’t select anything.

  • Type Into and Send Hotkey (e.g., Down, Enter) also don’t work.

  • I tried capturing the selector, and here’s a sample:

<html app='msedge.exe' title='Application Form' />
<webctrl name='dlbReject_code' tableCol='1' tableRow='1' tag='SELECT' colName=' --Select Reject Code--  CL ALRDY MAX OF CORP RANK CL  (26H2)    UNCONTACTED  (55U1)    MISREP OF FACTS OR FRAUD  (57A1)    NDB COURT CASE  (59A1)    NDB CANCELLED CARD  (61A1)    POOR CREDIT EXPERIENCE  (61B1)    SPECIAL OCCUPATION  (63A1)    POOR OCCUPATIONAL RISK  (63A2)    UNSTABLE EMPLOYMENT  (67A1)    UNSTABLE INCOME  (68U1)    BUSINESS NEWLY ESTABLISHED  (69A1)    OVEREXTENDED  (70A1)    BUSINESS NOT LISTED  (71H1)    BELOW 18 YEARS OLD  (72A1)    FOREIGNER  (73F1)    OVERAGE  (73J1)    MISHANDLED OR C ALERT OR ACA  (73L1)    POSSIBLE COLLECTION PROBLEM  (74A1)    WRONG CREDIT CARD NUMBER  (75A1)    NOT A PRINCIPAL CARDHOLDER  (75A2)    CARD LESS THAN REQ TENURE  (75A3)    CARD LESS THAN REQUIRED CL  (75A4)    ICL REJECT LIMITED CREDIT EXP  (76A)    PL HIGH CREDIT RISK  (77)    AMLA I OFAC BLACKLISTED  (78A1)    FAILED RV  (81)    FAILED EMP I BUSINESS VER  (82)    BELOW PASSING SCORE  (96A)    LESS THAN 2 YRS EMPLOYED  (96Z1)    SYSTEM REJECT FOR UND  (UND)   ' />

My goal is to select a value from the dropdown that matches the description in my CurrentRow (from a DataTable), even if the exact code isn’t the same.
Has anyone encountered this issue with JavaScript-rendered dropdowns? Any workaround or best practice to reliably select an item?
Thanks in advance!

Hello @fsgmacalino,

Use one of these workarounds:

  1. Click + Click Item – Click the dropdown, then click the desired option using a dynamic selector.

  2. Inject JS Script – Set the value and trigger the change event using JavaScript.

  3. Find Children – After opening the dropdown, loop through list items and click the matching one.

Hi @sagar.singh1,

Thanks for the help! I tried Option #1 (Click + Click Item using dynamic selector), and I was able to generate the selector dynamically based on my CurrentRow value. However, the robot still can’t click the dropdown item.

It seems like the options are either not visible in the DOM or disappear too quickly after the dropdown is clicked. I also tried using Highlight in UI Explorer, but it doesn’t detect the individual items. would Inject JS Script be the better approach here?

Thank you!

If you are free, schedule a meeting and we’ll check

@fsgmacalino,

Can you try Find Children activity to get all the dropdown items and then set text.