2
Is there any way to browse web pages, create requests like .Document.getElementById(" ")
without the need to use the component WebBrowser()
on my form?
WebBrowser browser = new WebBrowser();
browser.Navigate("http://");
//[...]
var valor = browser.Document.getElementById("");
Ideally perform the navigations and requests, without the need for the system to perform the rendering web page.
The idea is to make the loading of the pages as soon as possible, to access a very large and sequential amount of pages, retrieving your information in specific ID elemets.
Also, is there any way to wait for the full page upload to be performed before creating the request getElementById
, unused (to the WebBrowser
):
while (browser.ReadyState != WebBrowserReadyState.Complete) {
Application.DoEvents();
}
If you don’t have the page loaded, how could you get elements from it? Can you elaborate more on the scenario? When it says "very large and sequential number of pages" it refers more concretely to what?
– João Martins
Hello @Joãomartins, I would like to load the page yes, I would just like to know if there is any other way to load pages, access your objects using an alternative to Webbrowser(), because my system will load a page, recover a value from it, go to next page, regain its value... So on. Thank you very much for your help, from now on.
– Gabriel