You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried below code and it still it failing if element not found on the page,
ptor.findElement(protractor.By.xpath('//*[@id="dLabel"]')).then(function(element) {
element.click().then(callback);
}
, function() {
callback()
});
How would I go about clicking a button if it exists and ignoring it if it doesn't?
isElementPresent
won't do it for me, because I want to handle a case where the element is not present. Almost likeAny sort of error handling on the promise? Any other way of doing this?
The text was updated successfully, but these errors were encountered: