Click date in IE datepicker window

Hey Guys, this one has me pulling my hair :slight_smile:

Im using a HR system, and in it theres a digital signature feature that uses some sort of embedded Internet explorer window. In it there are two fields that dates are entered into. Then the robot clicks a button to continue. However, that button wont show up unless the dates are entered AND the datepicker field is clicked(the date that is marked in blue).
The selector that used to work for that Click activity looks like(hade to remove the < and >):

uia role=‘table’ /><uia name=‘{{Datevariable}}’ role=‘item’ / uia name=‘{{Datevariable}}’ role=‘text’ /

“Datevariable” is the date that is assigned earlier in the process.

Now that issue is that if the datepicker is open and the date is for example the 28th as seen below, there are 2 matches for “28” which is the date used.

The robot will then pick the first one which is not the right one(the one marked in blue).

So what i want the robot to do is ignore the first match and use the second one. Basically: if there are two matches for this variable, use the second. It is not possible to read the enitre datepicker box either so i cant check for duplicate dates in it.

It might be noted that the previos selector used looked like:

html app=‘lime.exe’ title=‘E-signering’ /
webctrl idx=‘1’ tag=‘TABLE’ /
webctrl tag=‘TD’ class=‘day active’ /

It seems to use the class:day active to identify the date marked in blue. The selector does not work anymore though, not sure why(i didnt create it).

Hope this makes sense, i totally get if it doesnt! let me know what i need to clarify.

Hi @thomasb82 ,

Try to be more specific on the selector…
Like, if your robot has to click feb28, the date should be there on the selector [month]. Add some attributes[text] to you selector. It solves your need…

hm, how do you mean?

the original selector looks like:
uia role=‘table’ /
uia name=‘28’ role=‘item’ tableCol=‘3’ tableRow=‘6’ /
uia name=‘28’ role=‘text’ /

then it changes the uia name according to the day clicked. But since there are two “28” visible at once it chooses the first instance even though it’s not the active one.

@thomasb82 ,

I think, you have some issue with selector…

  1. What you can do is, Use Ui explorer and try to add additional attribute in which from attribute panel.

  2. Another way you can acheive it, by passing the date value directly to the pane.
    By using type into activity

Let me know, which works for you…

Hm, had to do a workaround for it another way, it got to complicated. It’s the underlying system that is like 150 years old :slight_smile: thanks for your time anyway!

1 Like

@thomasb82

Try to use Set Text activity, if you have text box to write the Date

If the textfield is disabled then you can enable AlterIfDisabled option from the properties of SetText activity

Hope this helps you

Thanks