Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save try-catch exception into report #22

Closed
combatx007 opened this issue Sep 1, 2015 · 1 comment
Closed

How to save try-catch exception into report #22

combatx007 opened this issue Sep 1, 2015 · 1 comment

Comments

@combatx007
Copy link

I want to do so:
try {
assert.equal(title, 'webdriver');
} catch (e) {

}
This is necessary, that test didn't come down, after 'assert'. But, in this case, report does not contain the error. How to save exception into report in this case? Please help me.

@adamgruber
Copy link
Owner

I'm not sure why you'd wrap an assert inside a try/catch. If the assert fails, your test should fail and no other code should rely on the outcome of an assert. Consider reworking your test so it does not use a try/catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants