I use Protractor with Chai as Promised to create a javascript based testing tool and I get an error
AssertionError: expected 'http://localhost:8888/test/homepage.php' to equal 'http://localhost:8888/test/my_homepage.php'
while I check the URL with this step definition:
this.Then(/^The url of the page should be "([^"]*)"$/, function(myUrl, callback){
expect(browser.getCurrentUrl()).to.eventually.equal(myUrl);
callback();
});
I would like to catch this error in order to use another callback function, how can I do this? I tried using a try-catch block, but it does not seem to work. I can’t even understand if the AssertionErrorsTransporter is generating , could you give me an explanation about this?
Thank you in advance
source
share