javascript - Protractor Exceptions Codes -


i need handle exceptions no element found using locator: in protractor tests can provide better error message.

viewcompanydocumentpage.getattachmenttype().then(function (type) {     // handle success  }, function (err) {     console.log(err); }); 

when console.log() error object given has value called code , has value 7 above exception. can use error code provide better messages. can find other exceptions thrown protractor element locators , codes?

one option here follow page object pattern of astrolabe package:

astrolabe extension protractor adds page objects functional/e2e tests.

aside other features, there convenient way define own exceptions custom messages inside page objects.

also see:


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -