w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
351 stars 38 forks source link

network: removeIntercept option to remove all intercepts #526

Open juliandescottes opened 12 months ago

juliandescottes commented 12 months ago

While writing tests for add/remove intercept, I ran several times into scenarios where a previous test would leave an intercept that would impact the next test.

I am working around that by adding a fixture which will handle the cleanup, but maybe in general it could be nice to have a way to remove all intercepts, without having to pass the individual ids? Could be a new command, or just an option to the existing removeIntercept command?

thiagowfx commented 12 months ago

Adding the ability to remove all intercepts ("reset") seems reasonable.

Whether it should be a separate command, or a new option to the existing removeIntercept command, is subject to debate.

whimboo commented 12 months ago

It feels that this is somewhat similar to issue #326 which is for session.unsubscribe.

sadym-chromium commented 9 months ago

It will be useful for test state preparation, especially along with something like session.unsubscribeAll