How could I automate a dynamic click based on a data ( dynamic )

Hello guys.

I’m clicking this button because I’m establishing the basis to click but I’m aware that the bot needs to click different values ( it will change ) but I don’t know how to do this.

By the way, I’m using Strict Selector.


For example.

I’m saving the highest value of the id ( ExtractDataTable.Rows(0).Item(0).ToString ) in a variable called “testVariable” and I’m getting this in the variable “testVariable” but when I put that in the UIExplorer…

image

… I got “The element was not found”.

image

I’d like to put a variable inside there to make the bot changes the click based on a different value.

Thanks a lot.

Hi,

For now, can you try to remove tableRow attribute in the selector?

Regards,

1 Like

@pprin001

You can try using for each ui element which will loop through each element and can be clicked on it…if you want only specific ones to be clicked we can ass a if condition to check

Alternately you can remove the tabelrow and use the selector in for loop

Cheers

1 Like

Hi @pprin001 ,

I would go for the approach suggested by @Yoichi . To add to it, I would suggest to watch-out for spaces before and after value for aaname attribute. Also do not try to place dynamic selectors in UI Explorer, it doesn’t have any default value and hence it would fail.

For testing, you can have this activity in a separate xaml and test with different values and see how it works out.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.