Attempting to iterate through this table of selectors -- how can I compare to a string?

I’m attempting to iterate through this table of selectors, as you move down through each, the bottom portion of Form Information changes… I need to compare the Line of Business to the current object I typed in (CG 00 33 - it has a property of Line of Business with value) that I need to compare to the ones in the select list. If it matches, then I have to select that item in the select list and add…

Any suggestions?

Hi @ajeffers

Ur requirement is
Type the code and select the description data
from form and based on that select the option

Is it right?

If not can u explain ur Usecase more?

Of course, Nived,
You type a code at the top (which is in another workflow for a FOR LOOP of many of them)

Select the Description based on that item you typed in’s row property ALSO called Line of Business. Make sure it matches, click Add Form and proceed.

How u are matching it can u explain that part
And also add form I didn’t understand by that

Can u elaborate ur usecase more ?
By step by step @ajeffers

No problem.

We are pulling data from an excel sheet that has columns such as the following:

I have created a FOR loop to iterate through each of the Form Numbers (should there be more on that excel sheet) to enter in the above Search: and find the results below that…

When you scroll through the results of what you search, there are Form Info below as you scroll over each and I want to select the one that matches the exact Line of Business as the item I’m searching. I hope that is clearer.

Where u are selecting ? Can u show it i had doubt on it @ajeffers

Hi @ajeffers, looking at your post
This is my understanding
1.your typing some code and after search u will get a list of matching results then u have another check for Line of Business which u need to click and update. is that right?
if so then

  1. are u able to perform data scraping there on list items after search? if you are able to then do that take them in a datatable and iterate them using for each row
    2.Then inside the for each row using dynamic selectors click on first link first by using click and then use get text for getting text from the bottom container.
    After that use some string manipulations(may be use regex and get the line of business value)
    Now take if condition and gettext value =Line of business then use break or else continue the loop until u find that.

Hope this helps!
Happy Automation!
Regards,
Aditya

Hi Aditya! I unfortunately, when I data scrape that table, it does not come back in a nice formattable way. Any other ideas?

Hi @ajeffers u can do this way

Use uiexplorer and check in which attribute the all the values of select option can be found ( mostly will be innertext)

After typing the code, u get the form info, from that extract the description u want and store in the variable let’s say description

After that use get attribute activity indicating the select element and select which attribute u want to retrieve all value in select option and save it in varaible let’s say Children

Use if condition and use the following condition

Children.Contains(description)

If it is true, then use select item or click activitiy to select the option by using dynamic selector concept

If it is false, u can do accordingly in else section

Hope it helps

Mark it as solution if you got it

Nived N :robot:

Happy Automation :slight_smile::slight_smile::slight_smile:

Hi @ajeffers, is there any particular different selector for each list item in search box?
Can u share the selector screenshot? that will give more info for other ways.

Regards,
Aditya