Generation

generate functionTue, 08 Nov 2022

download html from an Uri with OpenQA and wait for the document to complete loaded

public async Task<Document> GetHtmlFromUri(string htmlUri) { var driver = new PhantomJSDriver(); driver.Navigate().GoToUrl(htmlUri); await Task.Delay(3000); driver.ExecuteScript("document.querySelector('#content').className = 'print-visible'"); await Task.Delay(3000); return driver.PageSource; }

Questions about programming?Chat with your personal AI assistant