Selector won't click the dynamic data

Hi,

I have a task to make selector click a date picker. I’m using strict selector and putting the variable inside the strict selector and somehow it’s still clicking the default value that I previously click to indicate it and not clicking the dynamic variable that contains the value. Any solution for this?

1 Like

Can you please check the actually selector. Then you put the variable in their
May be you need to enable the “aaname” or such type of selectors.

Watch this video:

I tried to use aaname and innertext on the strict selector it’s not working. Here is my selector :

"<webctrl id='frmMain:effDateDateEditorLayout' tag='TABLE' /><webctrl id='frmMain:effDateDateEditorLayoutY5' type='' tag='DIV' class='rich-calendar-editor-btn' aaname='"+year+"' check:innerText='"+year+"' />"

Hi @Rhys18 can you share the screenshot of your selector?


Please follow this way its working for me

Hi,

This is my selector value. I have to mask the title, but see the aaname and innertext. Tahun means year, so it’s a year variable. The value inside year variable inside is 2022, but somehow it’s always clicking 2021 (it’s because the indicator for the robot to find it)

image

The element is different. This is my elements :

I’m using both innertext and aaname, and somehow it’s not working

Is your selector contain ?

aaname=‘2022’ or any other spaces in the value?

If there is no any spaces then keep: tag, aaname only and remove innertext

Also check by ‘“+tahun+”’

have you tried to change the ui framework ? try with different and also you can try with modern activity

You just disable that innertext and enable aaname pass that variable in aaname only

Did you got any solution? otherwise ping me on skype ID: SIVA PRASADH

Sadly no,

I tried using innertext only, using aaname only it’s not giving the result that I want. It’s still clicking the value of the static one that I clicked.

What do you mean by modern activity? Is it modern selector like fuzzy? I tried it too and it’s not working

can you share that website link then i will try

the element trying to click with argument or var in selector have any empty space before or after eleement ? if yes just use wildcards before and after your var or argument

Sorry I can’t, it’s an intranet site. It contains a lot of sensitive information.

There is no empty space actually… I’m using UI Explorer to get the html tag

can you show us selector before and after replace the Var or argument for selectors?

Hi,

This is my fuzzy selector before modified (just click on the UI)

"<webctrl id='frmMain:effDateDateEditorLayout' tag='TABLE' /><webctrl id='frmMain:effDateDateEditorLayoutY3' type='' tag='DIV' class='rich-calendar-editor-btn' aaname='2021' check:innerText='2021' />"

This is my fuzzy selector after modified

"<webctrl id='frmMain:effDateDateEditorLayout' tag='TABLE' /><webctrl id='frmMain:effDateDateEditorLayoutY5' type='' tag='DIV' class='rich-calendar-editor-btn' aaname='"+year+"' check:innerText='"+year+"' />"

This is the strict selector before modified

image

This is the strict selector after modified

image

Hello @Rhys18

You can check the below video for the date picker automation.

Thanks