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:

<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:

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:

<input type="submit" onclick="return fnbValidateLogin()" value="Login" name="Login">

please help

Thank you

Try the following -

WebBrowser1.Document.All("Login").Click
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.