Issue with dynamic Selector

I am using dynamic selector for clicking a button on a website.

Selector Code:

Rows(RowCounter)(“Capacity”).ToString is a dynamic value that i am getting from excel.

This selector code works fine first time when opening browser but when this process repeat by opening same website again it doesn’t work. It does not click on same button. Please advise

1 Like

If you r concatenating the variable then u should use “+” sign try this if it works…

Your logic seems to be fine. My hunch is either the button attributes change when you are trying to click it for the second time. Or the excel parameter on the second row could have some additional characters like white space which makes the selector go wrong.

Use Write Line activity to print the selector before clicking the button. You can debug why it doesn’t click the second time.

i have tried with + sign but still its not working


Check the Second time generated Selector, does it same or different with first generated selector. I hope what @kaderms told might be correct.

i am using same selector 2nd time. it is dynamic.

it is using same selector in both cases. because it is dynamic.

i am using same excel sheet . parameters remain same because there is only one row in excel sheet. i have also printed selector its value remain same but it doesn’t work

If possible share your xaml file and excel sheet after removing confidential data