|
-
Oct 9th, 2009, 05:43 PM
#1
Thread Starter
Addicted Member
[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">
-
Oct 9th, 2009, 06:21 PM
#2
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|