
Announcements
Okay, so I am trying to interact with a date picker that is set to Read-Only and requires you to use the calendar picker interface to set the value. If I go into the HTML and remove the readonly attribute, I am able to manually type into the input field and set the date so now I am trying to do that programmatically.
How would I go about this?
Sheesh, I was making this way too complicated...I was not aware of the 'Run JavaScript Function on web page' action!
Here is the code I used. Since the element didn't have an ID I just did a query using the element type and name.
function ExecuteScript()
{
var elements = document.querySelectorAll('input[name="to"]');
elements.forEach
(
function(element)
{
element.removeAttribute('readonly');
}
);
}