I'm not sure what the technical name for what I'm looking for is, but this is what I'm trying to achieve:
I need to write a "client" for a specific website which uses Ajax/XHR for communication with the server.
My approach is to make a custom web browser that will run the JavaScript in the background, and I can show all the relevant information to the user. My first thought was to use hidden WebBrowser, however I'm not sure if it can achieve all the following:
- Denying requests (so that unnecessary content doesn't load)
- Inspecting (and possibly editing) XHR requests and responses
- Making custom JavaScript calls (using
javascript:
quasi-protocol is ok) - Inspecting HTML elements' event listeners (so that I can call them)
Basically, I want functionality similar to that of Chrome's Developer Tools, in C#.
What's the easiest way of doing so, since my current idea is to use WebBrowser through a custom proxy, with hardcoded event listeners (manually found, hoping names don't change soon)?