Clicking next on Dynamic selector and extract data for each "Name"

image

Hi everyone, I am trying to create a dynamic selector for this.
I notice the aaname keeps changing.
I am able to extract all the names in a data table.
My goal is for the selector to click at the right name, and extract the data for each name.

Any idea on how to make this dynamic?

The click selector looks like this

and the list go on.

@Irfan_Musa
You can read range that sheet
Then use a for each row in datatable Activity
inside for each use an asssign activity to store the current element into a variable and then inside for each use the activity and then edit the selector use the variable u created in aaname propery

1 Like

@Irfan_Musa try deleting the content of aaname in the selector , also keep the text as “ignore text”

2 Likes

@Irfan_Musa

Sequence:
Read Range activity (to read names into a DataTable): OutputDataTable

For Each Row activity (loop through each row in OutputDataTable):
Assign activity: currentName = row(“NameColumn”).ToString

  Click activity:
     Selector: "<webctrl aaname='" + currentName + "' tag='a' />"
1 Like

It is giving me an error ‘Row’ is not declared

Hi @Irfan_Musa

Use for each to iterate excel or datatable
Use click activity in that loop and make sure to use the strict selector only for target element
Pass that current row value in aaname atribute

or

Find children activity to get all the ship names
Use for each ui element
use click activity and pass the input as ui element

@rlgandu @Vikas_M @B_H_Akshatha_Pai Am I assigning it correctly?

@Irfan_Musa

Give assign activity in Do block of for each excel row Change Row to CurrentRow

@Irfan_Musa

Place the assign activity in do sequence
Instead of Row use CurrentRow

1 Like

@Irfan_Musa
it should be CurrentRow(“Ships”).tostring

1 Like

@Irfan_Musa
CurrentRow(“Ships”).ToString
Give in For each excel row

1 Like

May I know why we choose strict instead of fuzzy? Is it because I am only targetting the attritbute aaname?

@Irfan_Musa

Because fuzzy search capabilities enable you locate strings based on a pattern, rather than on an exact match to your input unlike strict search.

Strict search is a method where the automation looks for an exact match of the target element or data. It requires the element’s attributes or data to match precisely with the ones defined in the selectors or variables.

@Irfan_Musa

Use For each row in datatable activity instead of for each excel row
Assign:CurrentName=CurrentRow(“Ships”).tostring
Indicate the target on the application and use type into or click activity in that pass the aaname

Hi @Irfan_Musa

The Strict selector doesn’t scrap the duplicate elements. It will select the element strictly and the attribute doesn’t change in the strict selectors.

In Fuzzy selector it scraps the duplicate elements. It will select the duplicate elements and the attribute values changes every time in the fuzzy selectors. If the webpage is changes then the fuzzy selectors are difficult to target the element.

Hope it helps!!

Thank you for the explaination!

@rlgandu @supriya117 @mkankatala @Vikas_M

Hi all thank you for the help, I really appreciate it.

1 Like

Thank you @Irfan_Musa

If you find the solution for your query make mark it as solution to close the loop.

Happy Automation!!