Search code examples
c#htmlwpfawesomium

Retrieve HTML from page after given amount of time C# WPF


I am trying to get HTML from a page after a portion of Java executes and updates the HTML. (I know that Java continues to run while the page is open so there is no way to get the code "after" its finished). I'm trying to get the HTML from this page XBowling.com, you can see that there is a splash message before lanes load. I need to get the HTML after the lanes load so i can then look through the data to get to the Lane and then look through the lane's page data to get scores and what not.

I have been messing around with headerless browsers, I'm currently playing around with Awesomium with little success i can't get it to give me the updated version of the HTML just the original when the page first loads.

(I don't have any code because I don't have anything to show other then failed attempts to get the damn thing to work)


Solution

  • Install Selenium.Webdriver.Domify, Selenium.WebDriverBackedSelenium and Selenium.WebDriver.ChromeDriver using nuget and code something like

    using (var driver = new ChromeDriver())
    {
         driver.Navigate().GoToUrl(url);
         var columns = driver.Divs(By.ClassName("col-md-6"));
         // here you access the elements using driver object
    }