HTML change value of hidden field (datepicker)

studio

#1

Hi,

I need to select a date with a datepicker, without a visible inputfield. I already found that it has an HTML hidden field with the corresponding date. How can I manipulate this with UIpath?

Knipsel
–> the datepicker (not stable enough to “manipulate” this via UIpath)


–> I need to change the value of this hidden HTML input field. Because it’s hidden I can’t select it via the UIpath Explorer.

Anyone has an idea?


#2

Hello @ArneDeProft,

How about changing tha value attribute of the web element,

https://www.uipath.com/activities-guide/set-web-attribute


#3

Thank you, I indeed came across this function. But I dont know how to select the corresponding web element.


#4

Well for this you have to use selectors, one of the most important parts in UiPath. In order to find and tune the selector use the UiExplorer(Design->rightside in the photo).
selector

Check the official documentation:

After you target the wanted element you can store it in a variable and then on it you can use the Set web attribute


#5

Thanks for your feedback.
I know about selectors (I’ve done the Foundations training).

What do you mean with “after you target the wanted element”… This is what I have so far, and it is not working:


#6

You need to know the selector of that hidden element.

Select the entire page and check for hidden element.

image

OR

Can’t guarantee but, try to find children for that specific region. Check the Outerhtml or Innerhtml of those children.

If Output.Contains(“hidden”)

mySelector = item.Selector.

Keep your selector in any element (for eg Click) Open UiExplorer and manipulate your selector.


#7

I think I found the problem. The HTML I see in “inspect element” is different than the “show source”. This means that the datepicker-HTML is generated trough Javascript. Can it be that because of this my selectors are not working? Cause I cant find them using the UIpath Explorer (I literally clicked through everything on the left “visual tree”).


#9

For future reference, I’ve found the problem.
My selector was working, but apparently the value attribute reupdated after I went with “tabs” to the next field. So when I’ve put the “set web attribute” function last, the process was working.

Thanks for all your help!