-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] Fix error when we send non-base64 data for fetch command #12431
Conversation
Win! Now basics scenarios for network requests intercepting works. Before: driver.Manage().Network.StartMonitoring().Wait();
driver.Url = "https://google.com"; It throws many exceptions related to "Fetch" cdp domain. Now we are able even do: driver.Manage().Network.StartMonitoring().Wait();
net.AddRequestHandler(new NetworkRequestHandler
{
RequestMatcher = httpData => httpData.Url.Contains("google.com"),
RequestTransformer = req =>
{
req.Url = "https://selenium.dev";
return req;
},
});
driver.Url = "https://google.com"; // it opens selenium.dev instead of google.com And even changing response body: net.AddResponseHandler(new NetworkResponseHandler
{
ResponseMatcher = httpData => httpData.Url.Contains("google.com"),
ResponseTransformer = res =>
{
res.Body = "Hello World!";
return res;
},
}); |
Still facing issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @nvborisenko!
Description
I see a lot of exceptions while working with CDP. This PR fixes only one exception.
Types of changes
Checklist