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

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -