I need to validate whether the text box is empty or not. However, I seem to be encountering an issue and I'm not sure where I went wrong in my approach.
Page Object method
async getTextVal(){
await this.t.selectText(this.editor) //selecting the text box
return this.editor.innerText; //fetching the value in the textbox
}
TestCase
await t.expect(element.getTextVal()).eql(''); //assert statement
The getTextVal function works well when there is a value present in the text box. However, it fails when checking for an empty value.