Skip to content

Graceful exit #22

@Dasio

Description

@Dasio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions