Visual Basic 2008, why cant i click on this button on this webpage?

JD2369

Member
Joined
Jan 12, 2011
Messages
19
Programming Experience
Beginner
Hi im trying to write a program to automate a process but i cant get my program to click on this website's button

Here's the website's button code:

VB.NET:
<input type="button" class="w10pt" style="width:136px;display:block;font-weight:700;" value="Login" onclick="location.href='/start/login.htm?arg1=1'">

i tried:

VB.NET:
        theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
        For Each curElement As HtmlElement In theElementCollection
            If curElement.GetAttribute("value").Equals("Login") Then
                curElement.InvokeMember("click")
            End If

And many many other combinations but it doesnt work

I also have another button that i'm trying to click:

VB.NET:
<input type="submit" onclick="return fnbValidateLogin()" value="Login" name="Login">

please help

Thank you
 
Back
Top