if(validateBrowserError) {
                    dfd = dfd.then(function(){
                      return browser.getBrowserErrors().then(function(errs){
                        if(errs.length){
                          throw new Error(errs.join('\n'));