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

Graceful exit #22

Open
Dasio opened this issue Oct 16, 2018 · 0 comments
Open

Graceful exit #22

Dasio opened this issue Oct 16, 2018 · 0 comments

Comments

@Dasio
Copy link

Dasio commented Oct 16, 2018

Is there any way how to graceful exit script when selenium throw some error?
e.g $browser.findElement($driver.By.css("input[type='email']")) when there is no such element
I would like to propagate this error outside with console log of chrome(not necessary).
But the only way is to throw error from script, but that's not possible from catch in promise
$browser.findElement($driver.By.css("input[type='email']")).catch(function(err) { throw 42;}));
This can't work.

I would like to know where the error occured and log it.

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

1 participant