[dotnet] Fix error when we send non-base64 data for fetch command#12431
Merged
diemol merged 8 commits intoSeleniumHQ:trunkfrom Jul 31, 2023
nvborisenko:cdp-fix-part-1
Merged
[dotnet] Fix error when we send non-base64 data for fetch command#12431diemol merged 8 commits intoSeleniumHQ:trunkfrom nvborisenko:cdp-fix-part-1
diemol merged 8 commits intoSeleniumHQ:trunkfrom
nvborisenko:cdp-fix-part-1
Conversation
Member
Author
|
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.comAnd even changing response body: net.AddResponseHandler(new NetworkResponseHandler
{
ResponseMatcher = httpData => httpData.Url.Contains("google.com"),
ResponseTransformer = res =>
{
res.Body = "Hello World!";
return res;
},
}); |
Member
Author
|
Still facing issue |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I see a lot of exceptions while working with CDP. This PR fixes only one exception.
Types of changes
Checklist