1 Answer

0 votes
by
To determine whether an element exists on a webpage with isPresent function

// Element exists

expect(element(by.binding(‘person.name’)).isPresent()).toBe(true);

// Element not present

expect(element(by.binding(‘notPresent’)).isPresent()).toBe(false);
...