Issue while using dynamic selectors

Hi All,

I’m trying to pass a variable to date picker in an online calendar application which we use in the office.
So using a click activity indicating on screen I’m getting a selector value for date 18 as below:

html app=‘chrome.exe’ title=‘PROAD Software’ /
webctrl aaname=‘18’ idx=‘1’ parentid=‘timeRegistrationFormJS_cache_1079_client’ tag=‘DIV’ /

So for most of the dates, the aaname is changing with the respective values.
I’m modifying the selector and passing the variable from an excel table/data table as below:

html app=‘chrome.exe’ title=‘PROAD Software’
webctrl aaname=’"+dateselector+"’ idx=‘1’ parentid=‘timeRegistrationFormJS_cache_1079_client’ tag=‘DIV’

When I’m validating it, shows error message as

Cannot find the UI element corresponding to this selector:

html app=‘chrome.exe’ title=‘PROAD Software’ /
webctrl aaname=’"+dateselector+"’ idx=‘1’ parentid=‘timeRegistrationFormJS_cache_1079_client’ tag=‘DIV’ /

Please clarify what I’m missing.

Hi @Arun_Singh,

Copy that selector and delete from the selector editor and click ok.check in the selector property also empty. If yes open and paste it as a string format

Regards,
Arivu

Throws this error message

Hi @Arun_Singh

Try to give the whole selector with in Double quotes .I hope it should work

“html app=‘chrome.exe’ title=‘PROAD Software’ /
webctrl aaname=’”+dateselector+"’ idx=‘1’ parentid=‘timeRegistrationFormJS_cache_1079_client’ tag=‘DIV’ /"

Thanks

Still now working :frowning:

Hi @Arun_Singh

Is it giving you the same error.? Try to give the selector in double quotes. In previous post I copied the Selector you originally posted which looks like missing some tags after comparing it with your screenshot.

I would suggest you to give the selector like I used to give within double quotes and without missing any tags . Have you tried that?

Thanks

Hi @sivapradeep

Thanks for the reply. I found a way to make it work now. Just removed the index value and it worked! :smile:

Thanks once again to @arivu96 and @sivapradeep