Skip to content

Commit ae0130b

Browse files
committed
[dotnet] Clear handlers after each test in NetworkInterceptionTests.cs
1 parent 9040895 commit ae0130b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dotnet/test/common/NetworkInterceptionTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ namespace OpenQA.Selenium
1111
[TestFixture]
1212
public class NetworkInterceptionTests : DriverTestFixture
1313
{
14+
[TearDown]
15+
public void RemoveHandlers()
16+
{
17+
if (driver is IDevTools)
18+
{
19+
INetwork network = driver.Manage().Network;
20+
network.ClearAuthenticationHandlers();
21+
network.ClearRequestHandlers();
22+
network.ClearResponseHandlers();
23+
}
24+
}
25+
1426
[Test]
1527
[IgnoreBrowser(Browser.Firefox, "Firefox does not implement the CDP Fetch domain required for network interception")]
1628
public async Task TestCanInterceptNetworkCalls()

0 commit comments

Comments
 (0)