I want to make sure the getText returns a non-empty string before continuing the program flow.
I have tried :
var EC = protractor.ExpectedConditions; await browser.wait(EC.not(EC.textToBePresentInElement($('#result'), '')), 5000);
my div looks similar to:
But the browser.wait always passes as the empty character is considered to be included in every string:
console.log('teststring'.includes('')) //always returns true
Could someone let me know the correct way to wait till the text is present in an element? I cannot wait for a specific text as the text changes according to inputs.