When a page has an IFRame (and possibly a cross-domain) and cannot get a network request, I try two methods
1, use WebResourceResponseReceived
await webView.EnsureCoreWebView2Async(null);
webView.CoreWebView2.WebResourceResponseReceived += Test_WebResourceResponseReceived;
- Use DevToolsProtocol
await webView.EnsureCoreWebView2Async(null);
webView.CoreWebView2.Settings.AreDevToolsEnabled = true;
await webView.CoreWebView2.CallDevToolsProtocolMethodAsync("Network.enable", "{}");
var eventReceiver = webView.CoreWebView2.GetDevToolsProtocolEventReceiver("Network.responseReceived");
eventReceiver.DevToolsProtocolEventReceived += Test_ResponseReceived;
I try to use the Playwright Edge way, through the monitoring page, get all requests, including the IFrame, so speculation has nothing to do with the Edge should be, but I need to use the WPF, Playwright doesn't suit me
But I can only get home page requests. What do I do?
When a page has an IFRame (and possibly a cross-domain) and cannot get a network request, I try two methods
1, use WebResourceResponseReceived
I try to use the Playwright Edge way, through the monitoring page, get all requests, including the IFrame, so speculation has nothing to do with the Edge should be, but I need to use the WPF, Playwright doesn't suit me
But I can only get home page requests. What do I do?