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.
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
@Irfan_Musa try deleting the content of aaname in the selector , also keep the text as “ignore text”
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
Selector: "<webctrl aaname='" + currentName + "' tag='a' />"
It is giving me an error ‘Row’ is not declared
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
Find children activity to get all the ship names
Use for each ui element
use click activity and pass the input as ui element
Give assign activity in Do block of for each excel row Change Row to CurrentRow
Place the assign activity in do sequence
Instead of Row use CurrentRow
it should be CurrentRow(“Ships”).tostring
Give in For each excel row
May I know why we choose strict instead of fuzzy? Is it because I am only targetting the attritbute aaname?
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.
Use For each row in datatable activity instead of for each excel row
Indicate the target on the application and use type into or click activity in that pass the aaname
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.
Thank you @Irfan_Musa
If you find the solution for your query make mark it as solution to close the loop.