WebDriverJS: Canceling in the native-promise-based control flow?

13 views
Skip to first unread message

Richard Connamacher

unread,
Apr 18, 2017, 6:11:57 PM4/18/17
to webdriver
I saw on https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs that the Promise Manager-based control flow is deprecated in favor of native promises (which I think is a great move).

Is there a new way to cleanly abort currently-open WebDriver tasks, instead of calling 'cancel' on the old custom Promise class? I had written code to queue up unfinished promises and call .cancel() on them on SIGINT (user types control-C), which triggered an immediate rejection on any open tasks and allowed the front end to cleanly wrap up.

Something that closes those connections and causes a rejection to bubble up through the promise chain would be very useful.

Thanks,
Richard
Reply all
Reply to author
Forward
0 new messages