blocking-proxy icon indicating copy to clipboard operation
blocking-proxy copied to clipboard

Feature Request: Consistent/specialized/faster error for `unload` events during stability wait

Open sjelin opened this issue 8 years ago • 0 comments

If a browser navigates to a new page while blocking proxy is waiting for a stability script to call its callback, an error will occur (either directly or because the callback never gets called). This makes sense enough, but has a few issues:

  1. Depending on the selenium server implementation, the text of the error message changes.
  2. If the navigation occurs between two WebDriverBarriers, or after the barriers but before the actual commend is run, you won't error at all but instead run the command with some/all of the barriers not being run. This is just wrong and we should get an error message instead.
  3. Some tools would like to be able to handle this kind of error. For example, https://github.com/angular/protractor/issues/4052. However, because of the previous issues, it's hard to tell in a programatic way when you've run into this error. Blocking Proxy should have a custom error message that's easy for something like Protractor to identify (or provide a method for distinguish this error in BPClient).
  4. Some implementations may just let the command timeout. Waiting for a timeout should be unnecessary in this case, since Blocking Proxy should be able to see that the script timed out.

In https://github.com/angular/protractor/issues/4053 I suggested Protractor deal with the same problem by using browser.driver.wait. Blocking Proxy could do something analogous.

sjelin avatar Feb 02 '17 05:02 sjelin