Rhys18
(Rizky Albert Hartono)
September 28, 2022, 9:59am
1
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:
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:21am
3
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
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:30am
7
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)
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:33am
8
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+”’
Veera_Raj
(Veera Raj)
September 28, 2022, 10:34am
10
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
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:41am
13
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.
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:41am
14
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
Veera_Raj
(Veera Raj)
September 28, 2022, 10:43am
16
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
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:44am
17
Sorry I can’t, it’s an intranet site. It contains a lot of sensitive information.
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:45am
18
There is no empty space actually… I’m using UI Explorer to get the html tag
Veera_Raj
(Veera Raj)
September 28, 2022, 10:46am
19
can you show us selector before and after replace the Var or argument for selectors?
Rhys18
(Rizky Albert Hartono)
September 28, 2022, 10:54am
20
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
This is the strict selector after modified
Hello @Rhys18
You can check the below video for the date picker automation.
Thanks