selenium webdriver - Protractor expect an element to not be present and receive an error saying it cannot be found -
i've searched numerous forums users similar issue no avail. issue follows:
i'm writing protractor test expects html element not present:
expect(result[0].$('#edit').ispresent()).tobe(false);
when run test, throws following error:
no element found using locator: by.cssselector("#edit")
am wrong find hard wrap head around this? imagine pass test since expect element not available. if somehow available, say: expected true false
or similar.
any clarification appreciated!
i approach iselementpresent()
calling on result[0]
:
expect(result[0].iselementpresent(by.css('#edit'))).tobe(false);
Comments
Post a Comment