-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
javascript interface not working with setTimeout #363
Comments
++ The same issue occurs if the setTimeout wraps I'm using selenium-webdriver@2.45.1 in Buster.JS's test runner to drive embedded Chromium. It's possible that webdriver code is executed in a setTimeout or some other delayed mechanism in the test runner. |
I did some digging and so far I've only determined that reverting back to https://github.com/SeleniumHQ/selenium/blob/ecfefd32aba140f79f62986b0c7944c197c3ff03/javascript/webdriver/promise.js allows the code to continue. |
Problem is the flow gets confused and deadlocks itself when a command is scheduled asynchronously when there's a dependency on the running task. Basic repo case:
Output:
Need to update the flow to differentiate between this and legit sub-commands. |
e.g.
This small program gets stuck and never ends, but it we move the line
remote.executeScript('return true').then(log, onError);
out of thesetTimeout
callback then it starts working as expected.Shouldn't the
executeScript
call schedule the operation regardless of when it is called?I'm using selenium-webdriver@2.45.1
The text was updated successfully, but these errors were encountered: