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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -