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
Then the screenshot gets taken before the click happens. The page.waitForReady function waits for XHRs to complete, but it doesn't wait for other async code to run. I'm not even sure if this is possible with Phantom.
The text was updated successfully, but these errors were encountered:
Yeah this is hard. We could try to override setTimeout to register / wrap callbacks? What I worry about is it's often the case that a page always has N callbacks set at all times and the set of outstanding callbacks never goes to zero.
One option is to have a "trigger test end" callback in the global scope like window._dpxdt_Done(). Then the injectJs can set the whole page up, do its own timeouts, and trigger the load. You can boost the timeout to make room for this to happen, or maybe we could have another flag per test which says to always wait for the Done() call to happen?
@ihodes ran into this, if you inject some JS along the lines of:
Then the screenshot gets taken before the click happens. The page.waitForReady function waits for XHRs to complete, but it doesn't wait for other async code to run. I'm not even sure if this is possible with Phantom.
The text was updated successfully, but these errors were encountered: