MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / StartMonitoring

Method StartMonitoring

dotnet/src/webdriver/NetworkManager.cs:71–81  ·  view source on GitHub ↗

Asynchronously starts monitoring for network traffic. A task that represents the asynchronous operation.

()

Source from the content-addressed store, hash-verified

69 /// </summary>
70 /// <returns>A task that represents the asynchronous operation.</returns>
71 [RequiresUnreferencedCode("NetworkManager is currently implemented with CDP. When it is implemented with BiDi, AOT will be supported")]
72 [RequiresDynamicCode("NetworkManager is currently implemented with CDP. When it is implemented with BiDi, AOT will be supported.")]
73 public async Task StartMonitoring()
74 {
75 this.session.Value.Domains.Network.RequestPaused += OnRequestPaused;
76 this.session.Value.Domains.Network.AuthRequired += OnAuthRequired;
77 this.session.Value.Domains.Network.ResponsePaused += OnResponsePaused;
78 await this.session.Value.Domains.Network.EnableFetchForAllPatterns().ConfigureAwait(false);
79 await this.session.Value.Domains.Network.EnableNetwork().ConfigureAwait(false);
80 await this.session.Value.Domains.Network.DisableNetworkCaching().ConfigureAwait(false);
81 }
82
83 /// <summary>
84 /// Asynchronously stops monitoring for network traffic.

Callers

nothing calls this directly

Calls 3

EnableNetworkMethod · 0.45
DisableNetworkCachingMethod · 0.45

Tested by

no test coverage detected