Results 1 to 2 of 2

Thread: [RESOLVED] WebBrowser help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2008
    Location
    UK
    Posts
    171

    Resolved [RESOLVED] WebBrowser help

    Hi i've created a simple application to login to a particular website to save me time instead of having to load up IE / FF and manualy log-on.

    The user/pass boxes are still the same, I don't show the actual page until it's finished loading and has logged in.

    Problem: If the user has entered the wrong details, the page would still load and the user would have to type details in on the site anyway.

    Solution: I need to be able to detect the wrong / user password on the site before making it visible. To do this I need to locate "Invalid login, please try again" in the source code which appears when login details are incorrect.

    Cheers (new to .NET).

    Code:
     <div class="loginerrors"><span class="error">Invalid login, please try again</span></div>        <form action="index.php" method="post" id="login">

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2008
    Location
    UK
    Posts
    171

    Re: WebBrowser help

    *resolved.


    Used code:

    Code:
    If WebBrowser1.DocumentText.IndexOf("Invalid login, please try again") > -1 Then
    Works for now so i'm happy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width