c# – WebDriver send HTML to browser
I’m receiving HTML files via a 3rd-party service and they are normally to be opened in a Browser that is logged into the service (i.e., sends the correct cookies), some JavaScript contained in the HTML is executed and the resulting DOM is the output I want.
How can I automate this process for lots of HTML files? Is it possible to open them using Selenium WebDriver somehow, add the necessary Cookies to Selenium web driver and then download the result DOM from Selenium to a file again?
Is there a quicker way than using Selenium, maybe some library that I can use?
If it helps, the library could also potentially request the original HTML via an URL, however, it must be a POST request with certain form-url-encoded content, so nothing I can easily do via Selenium.
Read more here: Source link