0

Hello,

I try to catch the HTML code from a webpage after I have logged in to a page.
HTML is returned but that is the orignal HTML only BEFORE I logged in. For example I try to find "Log out" and other content in the string "getDocumentHTML" returned which exists on the webpage. But that can't be found.

How do we returned the final HTML content for the webpage after logging in?

        private void button1_Click(object sender, EventArgs e)
        {
            String url = textBox1.Text;
            webKitBrowser1.Navigate("http://hotmail.com");
        }
        private void webKitBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            //This doesn't returnd the FINAL HTML content after a login to a webpage
            String getDocumentHTML = webKitBrowser1.DocumentText;
        }

Edited by Darth Vader

2
Contributors
1
Reply
8
Views
1 Year
Discussion Span
Last Post by JOSheaIV
0

This can be tricky. It really depends on how the login is done for the page. You would have to log in to the base using your webKitBrowser1, using the code. Unfortantly I can't find the code awhile back, but you should be able to google and see what's possible

(Again depending on how the login logic works, some approaches may not work, for instance, I had one application I used a cURl library, however, to login completely, I had to have a cookie generated ahead of time, but for it to be valid, I had to login though like a web browser normally, to make the cookie valid)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.