lambdium
lambdium copied to clipboard
Graceful exit
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.