How to check if an element is present with protractor?
Submitted by harrydev on Fri, 11/23/2018 - 10:55Before performing an action with an element, we just need to make sure of the presence of the element on the web page. When we try to interact with an element, if it is not present, it will throw an error/exception, so it is always important checking for the presence of the element.
Example : - When we click a Submit button, we know that we have to wait a second or two for something to happen. Here before trying to test the response, we can always check for element/s that are expected.