Merge pull request #16345 from donaldpipowitch/patch-6

added promise.USE_PROMISE_MANAGER to selenium-webdriver
This commit is contained in:
Arthur Ozga
2017-05-16 13:35:54 -07:00
committed by GitHub
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -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
+4
View File
@@ -961,3 +961,7 @@ async function TestAsyncAwaitable() {
let thenable: webdriver.promise.Promise<string> = new webdriver.promise.Promise<string>((resolve, reject) => resolve('foo'));
let str: string = await thenable;
}
function TestPromiseManagerFlag() {
webdriver.promise.USE_PROMISE_MANAGER = false;
}