Problem
Some chimp tests rely on creation of a new asset, and steps in the test cannot run until that asset is created and a request for that resource will be successful. Previously, browser.pause was the best solution we had for this.
Fix
Add a new waitUntilRequestHasStatus command, which repeatedly performs a synchronous XMLHttpRequest until either the specified status comes back (default of 200) or we timeout. This should help (albeit maybe slightly) with our test reliability.
From MDN:
Note: Starting with Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27), Blink 39.0, and Edge 13, synchronous requests on the main thread have been deprecated due to the negative effects to the user experience.
So this synchronous XMLHttpRequest is technically deprecated in other browsers. But as long as we are running in Chrome it should not be a problem. Something to consider, though.
Issue
352
Problem Some chimp tests rely on creation of a new asset, and steps in the test cannot run until that asset is created and a request for that resource will be successful. Previously,
browser.pause
was the best solution we had for this.Fix Add a new
waitUntilRequestHasStatus
command, which repeatedly performs a synchronousXMLHttpRequest
until either the specified status comes back (default of200
) or we timeout. This should help (albeit maybe slightly) with our test reliability.From MDN:
So this synchronous
XMLHttpRequest
is technically deprecated in other browsers. But as long as we are running in Chrome it should not be a problem. Something to consider, though.