0 votes

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);

Related questions

0 votes
asked Apr 5, 2021 in Protractor by Robindeniel
0 votes
asked Apr 5, 2021 in Protractor by Robindeniel
...