You need to get the source code of the page in which there are certain elements (located in a separate header on the page). This header appears only after the download of certain JS scripts, if the scripts are not loaded, respectively, there are no data elements.

How can I realize getting the code without using for example webBrowser ?

I myself use xNet libraries to connect and get the code, as well as the Html Agility Pack for parsing content.

  • Understand the js scripts. Perhaps your data is loaded by a separate ajax request. You can repeat it xNet and generate the necessary html code using HAP - 123_123

2 answers 2

In HTML, as in the YaP, the execution of the code goes from top to bottom. That is, you first need to give the tags (load your js files) <script src="YOUR_NEED_SCRIPT.js"></script> and then your " <script src="YOUR_NEED_SCRIPT.js"></script> respectively. And of course, do not forget to remove async defer so that it does not load asynchronously.

You can also upload your HTML dynamically after loading the necessary scripts.

 //With jQuery //this place you load need scripts, //after add html to document var html = "YOUR_HTML"; $("div.head_container").append(html); 

    Decided so:

    1. I brought into the textbox all the received code (I sinned that the code simply does not have time to load completely).
    2. Disassembled received code
    3. Walked all the way to my element.
    4. Found that the received Xpath from Google Chrome was not quite correct.
    5. /tbody removing the extra /tbody I got the value of the element I need without errors.

    Thank!