element.getAttribute('value') returns null in Protractor, although in source code the value details are present.
Below is my code,
console.log(await this.textArea.getAttribute('value'));
I read other posts around the same issue, but those are old and no solution is working for me. I also tried for entering input with browser.actions().click(element).sendKeys('input').perform(); thinking of it could be sendKeys() API issue but still no luck.
And the same code "element.getAttribute('value')" was working perfectly fine till 1st June 2021 and suddenly returning null value, not sure if there are any code changes or compiler version needs to be updated?
This is not an answer to the question but found the root cause that the latest Chrome version 91.0.4472.77
is having an issue with the element.getAttribute('value')
method. It is also giving an issue with Full calendar angular component https://github.com/fullcalendar/fullcalendar/issues/6343
I'm able to run my tests on Microsoft Edge Version 91.0.864.37
browser