Of course, this might work, but I'm not sure if it can connect directly using the VS performance test. An alternative can simply be created if you want to integrate with C # and VS.
In this case, the question will lead to how JS and C # can be combined. This can be done with the .NET platform if you embed your JS on a page and then launch it using the WebBrowser control. In your javascript, you can pass the information back to the C # application by specifying window.external . Here is an example of your javascript:
window.external.performanceCallback([yourdata]);
to call the performanceCallback () method on the class that your WebBrowser control is in. However, before you can do this, you must make your class visible to the page that your web browser opens (window.external is the instance class you are referring to).
So, to set window.external when you create webBrowser in C #:
webBrowser1.ObjectForScripting = this;
In addition, you must mark the class with the ComVisible attribute.
[ComVisible(true)]
We remind you that WebBrowserControl depends on the version on IE installed on your computer. Therefore, be careful when versioning, javascript will only work to the extent that its IE can work. Make sure JS works in all reasonable versions of IE.
source share