Couldn't uniquely identify each row's field

Requirement:

I am trying on automate a workflow on AWS, where I want UI path to first click on Add dimension button and then fill the values in rows generated. For example,

Input :

> Blockquote

1. Name : Starter, Price : 5 [Description and API name get autofilled]
2. Name : Basic, Price : 2
3. Name : Advance, Price 3

Each row has two fields that I need to fill, First field is a dynamic dropdown where values gets decreased once they get choose in previous rows and Second field is a price field, where we can type a integer value.

Problem :

  1. Firstly I am not able to uniquely identify each row, as they are being generated by clicking on Add Dimension button. I tried UI path to select each dropdown and found out that their ids are randomly generated so I am not sure if there exist any way by which we can configure UI path to uniquely identify the last added row and fill the values in there.

UI element of each row’s dropdown after clicking Add Dimension button 4 times

<webctrl tag='BUTTON' id='first-control-id-96-1677491554456-3372' type='button' class='awsui_button-trigger_18eso_1qkof_97 awsui_has-caret_18eso_1qkof_137' aaname='' />

<webctrl tag='BUTTON' id='first-control-id-98-1677491554456-3987' type='button' class='awsui_button-trigger_18eso_1qkof_97 awsui_has-caret_18eso_1qkof_137' aaname='' />

<webctrl tag='BUTTON' id='first-control-id-100-1677491554456-3561' type='button' class='awsui_button-trigger_18eso_1qkof_97 awsui_has-caret_18eso_1qkof_137' aaname='' />

<webctrl tag='BUTTON' id='first-control-id-102-1677491554457-2713' type='button' class='awsui_button-trigger_18eso_1qkof_97 awsui_has-caret_18eso_1qkof_137' aaname='' />
  1. Second, In a case where there is a single row [I did not click on Add dimension button], I tried selecting a value from the dropdown button using
  • Select Item Activity : It said Target is not a valid UI Element for the select Item

  • Click Activity, where I used this below mentioned configuration and passed a Name variable to select the value from the dropdown :
    <webctrl tag='UL' aria-role='listbox' type='' class='awsui_options-list_19gcf_38sbc_93' aaname='{{Name}}’

It did not work and end up selecting random value from the dropdown.

In essence, I’m looking for a way to configure the UI path to uniquely identify Price field and Name field[dropdown] uniquely for each row and can also select the correct value from each dropdown.

Help Appreciated!!

Hi - @Anil_G, @supermanpunch

I’m sorry to trouble you guys personally, I posted this question a day ago, but it seems like the UI path algorithm has dropped its visibility, and I didn’t receive any reply. I’ve been struggling with this issue, and I’m feeling lost and helpless.
I’m reaching out to you in the hope that you could spare just 5-10 minutes of your time to help me out and provide some guidance on the matter. Your expertise would be of immense help to me in resolving the issue.

Hi @nikhil.gupta ,

We do observe a pattern in the id attribute first-control-id-96, first-control-id-98, there is a difference of 2 in the numbers (98, 96), It is also observed in the 3rd and 4th lines. Check if the difference in values is the same at different intervals or different inputs.

We could use it for our logic to identify the elements once we find the first element and it’s Id attribute value.

Also, If not done already, use UiExplorer to check on the different attributes that you would receive for the element. Maybe we could find a better attribute that could help more.

Hi @supermanPunch, Thanks for the reply.

Yes, I do see the similar pattern across all the buttons but I am not sure how to fetch this id inside a local variable and find next button with id having prefix of first-control-id-{last_index}+2.

Hi Nikhil
Instead of fetching , You can pass variable to id Create variable as ControlID type of int and by using counter add it by 2 each time

id= ‘first -control-id-’+ControlID.ToString+‘-167749155445*’

or

id= ‘first -control-id-’+ControlID.ToString+‘-*’

Or else

You can get attributes activity and fetch the control-ID
and stored inside local variable as expected by you

Try this once above and let us know

1 Like