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
In the above commit, the isPromise() utility function was simplified to look for the return from Object.prototype.toString() to be'[object Promise]', however this fails the function's JSDoc documentation that any object exposing a then() method would be considered a Promise (for example a WebElementPromise returns '[object Object]').
My scripts that rely on WebDriver.wait(<WebElementPromise>) currently fail, but work after reverting the above change.
I propose that the previous functionality is returned to the isPromise() function to allow thenable objects to be treated as Promises.
@cstringer, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
What happened?
84dd610#r84520555
In the above commit, the
isPromise()
utility function was simplified to look for the return fromObject.prototype.toString()
to be'[object Promise]'
, however this fails the function's JSDoc documentation that any object exposing athen()
method would be considered a Promise (for example aWebElementPromise
returns'[object Object]'
).My scripts that rely on
WebDriver.wait(<WebElementPromise>)
currently fail, but work after reverting the above change.I propose that the previous functionality is returned to the
isPromise()
function to allow thenable objects to be treated as Promises.Note: this may relate to the issue #9348
How can we reproduce the issue?
Relevant log output
Operating System
Mac OS
Selenium version
selenium-webdriver@4.4.0
What are the browser(s) and version(s) where you see this issue?
Chrome
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 105.0.5195.19 (b9c217c128c16f53d12f9a02933fcfdec1bf49af-refs/branch-heads/5195@{#176})
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: