You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Currently I'm shifting things from new wdpromise.Promise() and wdpromise.fulfilled() to flow.promise() and wdpromise.when(). These functions are useful because they instance a ManagedPromise when the control flow is enabled, but a native ES6 promise when the control flow is disabled.
However, when the control flow is completely removed from selenium-webdriver many of the helper functions will go away. The when() function and SimpleScheduler will certainly go away.
We have two options:
Create a helper file promiseUtils.ts which has its own version of
wdpromise.when()
wdpromise.all()
wdpromise.controlFlow()
flow.promise()
etc.
Wait until selenium-webdriver removes the control flow entirely and then transition over to the ES6 native functions
Promise.fulfill()
Promise.all()
null (there is no ES6 equivalent to the control flow)
new Promise()
etc.
Option 2 is certainly more standard, it has some disadvantages:
It cannot be started until the control flow is totally removed, as it would break any users relying on the control flow
During the period of time while we wait for the control flow to be removed, these functions may be deprecated.
Option 1 is what jasmine did in angular/jasminewd#82, but that's largely because jasminewd isn't tied to a specific version of selenium-webdriver like Protractor is.
The text was updated successfully, but these errors were encountered:
sjelin
changed the title
Remove all direct usage of webdriver.promise and instead shift everything over to a promiseUtils.ts file
Remove all direct usage of webdriver.promise
Feb 8, 2017
Currently I'm shifting things from
new wdpromise.Promise()
andwdpromise.fulfilled()
toflow.promise()
andwdpromise.when()
. These functions are useful because they instance aManagedPromise
when the control flow is enabled, but a native ES6 promise when the control flow is disabled.However, when the control flow is completely removed from
selenium-webdriver
many of the helper functions will go away. Thewhen()
function andSimpleScheduler
will certainly go away.We have two options:
promiseUtils.ts
which has its own version ofwdpromise.when()
wdpromise.all()
wdpromise.controlFlow()
flow.promise()
selenium-webdriver
removes the control flow entirely and then transition over to the ES6 native functionsPromise.fulfill()
Promise.all()
null
(there is no ES6 equivalent to the control flow)new Promise()
Option 2 is certainly more standard, it has some disadvantages:
SimpleScheduler
anyway.Option 1 is what jasmine did in angular/jasminewd#82, but that's largely because
jasminewd
isn't tied to a specific version ofselenium-webdriver
like Protractor is.The text was updated successfully, but these errors were encountered: