Render HTML/Execute JavaScript in C# Console Application

I am having an html page like this:-

<html xmlns="">
     <script type="text/javascript" src="http://......someFile.js"> </script>
        function CallJs()
            var decodedCookie = decodeURIComponent(document.cookie);
<body onload="CallJs();">


If I execute this page on a browser I get the desired result. But I want to execute the JavaScript code written in this page without using a browser. I want to execute it on a C# console application.

Is there any way of doing it ?

You can try to use msscriptcontrol in this situation. You can check below thread:

How do I call an external JScript function from a VB.NET console application?

You can also check the article below which may help you.

Make your .Net application support scripting – a practical approach