• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:


How can we click on a special location of a web browser control at run time since it has no MouseMove nor Click events that we can simulate ?
  • 2
1 Solution
The answer I gave was for simulating filling out an HTML document and  clicking the submit button on an HTML document where the user knows the field names and submit button name...

Here is the answer I gave previously:

You can do this with the Microsoft Internet Control.  To add this to your project, right-click the toolbar (the window with the textbox, listbox, label, etc.) and select "Components..."

Then select "Microsoft Internet Control" from the list.

You can then do something like this:

    WebBrowser1.Navigate "http://www.yourdomain.com/cgi-bin/showvar.cgi?Arg1=aaa&Arg2=bbb

Where everything in the quotes before the question mark is the URL and everything after the question mark are arguments to be passed.

The format for an argument is:


You separate multiple arguments with a & (ampersand character).

To give you an example, let's say this is the html code on the form you're filling out:

<form method="get" action="/cgi-bin/myscript.cgi">
<input type="text" name="uname" value="">
<input type="text" name="upwd" value="">
<input type="submit" name="Login" value="Login">

This is what you could do:

Dim UserName As String
Dim Password As String

UserName = "mcrider"
Password = "noneofyourbusiness"

WebBrowser1.Navigate "http://www.yourdomain.com/cgi-bin/myscript.cgi?uname=" & UserName & "&upwd=" & Password & "&Login=Login"


Hope this helps!

Thanks for the points! Glad I could help!


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now