Skip to content

Commit

Permalink
[dotnet] Clear handlers after each test in NetworkInterceptionTests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Aug 29, 2023
1 parent 9040895 commit ae0130b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dotnet/test/common/NetworkInterceptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ namespace OpenQA.Selenium
[TestFixture]
public class NetworkInterceptionTests : DriverTestFixture
{
[TearDown]
public void RemoveHandlers()
{
if (driver is IDevTools)
{
INetwork network = driver.Manage().Network;
network.ClearAuthenticationHandlers();
network.ClearRequestHandlers();
network.ClearResponseHandlers();
}
}

[Test]
[IgnoreBrowser(Browser.Firefox, "Firefox does not implement the CDP Fetch domain required for network interception")]
public async Task TestCanInterceptNetworkCalls()
Expand Down

0 comments on commit ae0130b

Please sign in to comment.