Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dotnet/src/webdriver/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public async Task StopMonitoring()
this.session.Value.Domains.Network.AuthRequired -= OnAuthRequired;
this.session.Value.Domains.Network.RequestPaused -= OnRequestPaused;
await this.session.Value.Domains.Network.EnableNetworkCaching().ConfigureAwait(false);
await this.session.Value.Domains.Network.DisableNetwork().ConfigureAwait(false);
await this.session.Value.Domains.Network.DisableFetch().ConfigureAwait(false);
Comment thread
nvborisenko marked this conversation as resolved.
Comment thread
nvborisenko marked this conversation as resolved.
}

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions dotnet/test/webdriver/NetworkInterceptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public async Task TestCanInterceptNetworkCalls()
string text = driver.FindElement(By.CssSelector("p")).Text;
await network.StopMonitoring();
Assert.That(text, Is.EqualTo("I intercepted you"));
driver.Navigate().Refresh();
text = driver.FindElement(By.CssSelector("h1")).Text;
Assert.That(text, Is.EqualTo("Heading"));
Comment thread
nvborisenko marked this conversation as resolved.
Outdated
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
Outdated
}
}

Expand Down
Loading