-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[💡 Feature]: Modification of outbound network request props #12914
Comments
@MubarakGj thanks for raising the issue. I have to verify if this may already work in v9 our upcoming major release. I will get back to you on that. |
webdriverio/examples/devtools/intercept.js Lines 17 to 31 in 247b729
|
Thanks for reporting! We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers! |
In v9 this is currently not possible but can be implemented right here. What type of user interface would you like to see? How would you like to modify request data? |
if we have a method somthing like, browser.intercept(params...) to modify the requests sent to a specific destination, calling the method should modify all the requests sent to the URL after this point.
this can directly add those headers to all the intercepted requests or modify them if they already exist.
We can do even more things if we can intercept all the requests going out of the browser by giving a generic target URL value. something like "**/*" or "". |
Is your feature request related to a problem?
I would like to capture the network calls happening in the background while running the tests and modify the captured request headers and body before the request leaves the browser
Describe the solution you'd like.
If there is browser.intercept() method available which takes a call back function like
browser.intercept(“regex of url to be intercepted”, (request)=>{ // request modification commands});
This could be used to do all the actions that we want before a request is sent.
Describe alternatives you've considered.
we have used cypress to automate single tab use cases. it supports these kind of request interception and modification.
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: