You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
If user tries to access an element that does not have the attribute 'value' then the EC.textToBePresentInElementValue throws Cannot read property 'indexOf' of null error :
let EC = protractor.ExpectedConditions;
describe('Test', function () {
it('test {Regression} {Sanity} {Sanity}', async function () {
await browser.get("http://juliemr.github.io/protractor-demo/")
let resultElement=element(by.xpath('//h2'))
await browser.wait(EC.textToBePresentInElementValue(resultElement, 'Z'), 5000,"this is first 1");
});
});
Expected:
Script should wait till value attribute is present and contains in the text. If not, it should time out with customised message "this is first 1",