My website is currently utilizing Angular Material, which is causing the text format in my type='time' input field to change. I am looking for a way to verify this text, but none of the methods I have tried give me the actual displayed text.
I attempted to access the following element properties: value, valueAsDate, textContent, innerHTML.
Additionally, I experimented with jqlite's val() method.
To better illustrate my problem, here is a codepen showcasing it: https://codepen.io/carlins/pen/JJNJab
// The displayed text is 02:57 PM
document.querySelector('input').value // Returns 14:57:00.000
document.querySelector('input').valueAsDate // Returns 1970-01-01T14:57:00.000Z
document.querySelector('input').textContent // Returns empty
document.querySelector('input').innerHTML // Returns empty
angular.element(document).find('input').val() // Returns 14:57:00.000