automation with WebBrowser Control?

VBDOTNETNewbie

New member
Joined
Dec 3, 2005
Messages
2
Programming Experience
5-10
Hi All,

I was wondering if someone could help with a web browser control. I am creating an application for my own use in Vb.net to auto fill forms and submit the form (log in) to various websites....(bank sites, credit cards etc..the require a login)

I am using the webbrowser control on my windows form and I can sucessfully populate the controls on the form (userid, password etc), by setting the value property of the HTML Form Element using....
HtmlDocument.GetElementsByTagName("Input")
.

My problem is that I cannot click the login button via code, sometimes it's an image and sometimes it's an actual button depending on the site that I'm auto logging in to, in both cqases the end result should me submitting the form.

Any help with this would be GREATLY appreciated!

Thanks!
 
I know this is a reallly old post, but just in case someone stumbles upon it during a search, here is a method I use to click a button:

VB.NET:
    Private Function ClickSubmitButton()

        Dim theButton As HtmlElement

        Try

            ' Link the ID from the web form to the Button var
            theButton = webbrowser1.Document.GetElementById("loginbutton")

            ' Now do the actual click.
            theButton.InvokeMember("click")
            Return True

        Catch ex As Exception

            Return False

        End Try

    End Function
 
Hi,
I did a search when I came across this older post and was wondering if anyone could help get this resolved.
I did not find a lot on this subject when I goggled it.
Any help would be appreciated.
Thanks!
 
Back
Top