This is the input tag that I want to get date value
<input readonly="" name="issued_at" type="text" placeholder=" " id="issued_at" data-testid="issued_at--input" autocomplete="new-textBox" value="5/3/2023">
I need to get the date value in this tag.
I wrote this function for getting the value but it didn't worked for me
async daysBetweenDates() {
const issueDateBox = await this.page.$('input#issued_at');
const issueDateText = await issueDateBox.getAttribute('value');
console.log(issueDateText);
}
I got this error:
TypeError: Cannot read properties of null (reading 'getAttribute')
Any idea?
Thanks in advance!