This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
Feature Request: Consistent/specialized/faster error for unload
events during stability wait #32
Open
Description
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:
- Depending on the selenium server implementation, the text of the error message changes.
- If the navigation occurs between two
WebDriverBarrier
s, 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. - Some tools would like to be able to handle this kind of error. For example, Refactor bootstrapping process and
browser.waitForAngular
to make them interruptible protractor#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 inBPClient
). - 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 angular/protractor#4053 I suggested Protractor deal with the same problem by using browser.driver.wait
. Blocking Proxy could do something analogous.