We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a166557 commit 1f1acc3Copy full SHA for 1f1acc3
py/selenium/webdriver/common/bidi/network.py
@@ -111,7 +111,8 @@ def _remove_intercept(self, intercept=None):
111
If intercept is None, all intercepts will be removed.
112
"""
113
if intercept is None:
114
- for intercept_id in self.intercepts: # remove all intercepts
+ intercepts_to_remove = self.intercepts.copy() # create a copy before iterating
115
+ for intercept_id in intercepts_to_remove: # remove all intercepts
116
self.conn.execute(self.command_builder("network.removeIntercept", {"intercept": intercept_id}))
117
self.intercepts.remove(intercept_id)
118
else:
0 commit comments