diff --git a/types/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts index c8d0c9b2de..2ec8f533ff 100644 --- a/types/selenium-webdriver/index.d.ts +++ b/types/selenium-webdriver/index.d.ts @@ -557,6 +557,13 @@ export namespace logging { export namespace promise { // region Functions + /** + * Set `USE_PROMISE_MANAGER` to `false` to disable the promise manager. + * This is useful, if you use async/await (see https://github.com/SeleniumHQ/selenium/issues/2969 + * and https://github.com/SeleniumHQ/selenium/issues/3037). + */ + let USE_PROMISE_MANAGER: boolean; + /** * Given an array of promises, will return a promise that will be fulfilled * with the fulfillment values of the input array's values. If any of the diff --git a/types/selenium-webdriver/test/index.ts b/types/selenium-webdriver/test/index.ts index f325fe6604..68cdd14fda 100644 --- a/types/selenium-webdriver/test/index.ts +++ b/types/selenium-webdriver/test/index.ts @@ -961,3 +961,7 @@ async function TestAsyncAwaitable() { let thenable: webdriver.promise.Promise = new webdriver.promise.Promise((resolve, reject) => resolve('foo')); let str: string = await thenable; } + +function TestPromiseManagerFlag() { + webdriver.promise.USE_PROMISE_MANAGER = false; +}