Invoking a click via the Webbrowser control on an element with no ID

maxedev

Member
Joined
Sep 3, 2010
Messages
8
Programming Experience
Beginner
I am attempting to fill the zip code through on

Target Mobile Find in Store

and click the GO button. However the button does not have an ID when I look at the HTML. I am able to fill the zipcode text box using:

WebBrowser1.Document.GetElementById("zipcode").InnerText = txtZip.Text

but I cannot figure out how to click the button. I've tried using sendkeys.send("{enter}") but that doesnt seem to do anything.

How can I either send the enter key after filling the zipcode or click the button?

Thanks in advance.
 
NM got it with:

WebBrowser1.Document.GetElementById("zipcode").InnerText = txtZip.Text
WebBrowser1.Document.GetElementById("zipcode").Focus()
SendKeys.Send("{ENTER}")
 
Back
Top