Google Answers Logo
View Question
 
Q: How do I click the buttons on forms in visual basic, using the web browser ctrl? ( No Answer,   2 Comments )
Question  
Subject: How do I click the buttons on forms in visual basic, using the web browser ctrl?
Category: Computers > Programming
Asked by: twowaymirrors_net-ga
List Price: $5.00
Posted: 08 Oct 2005 03:41 PDT
Expires: 07 Nov 2005 02:41 PST
Question ID: 577836
I am fairly experienced with the web browser control in Visual Basic 6
(I also use .net, but I much prefer 6). The one thing I can't figure
out is how to click on a specific button on a page, without using the
mouse. I'm writing a program that automates some tasks on various
websites, and need to have the browser automatically "click" the
buttons. I already know how to do this by programming the mouse to
move and click on its own, but the solution I'm looking for is to do
this without the mouse. Your help is greatly appreciated!
Answer  
There is no answer at this time.

Comments  
Subject: Re: How do I click the buttons on forms in visual basic, using the web browser c
From: 12345a-ga on 08 Oct 2005 14:48 PDT
 
I guess there could be ten or twenty ways of doing this.
Perhaps some thing like count=form.button.count.value  or form.buttons.src[X]
anyway that would be one way. 
I guess in visual basic you could read the source of the url, and then
figure out what urls to follow with what data values to submit.
Subject: Re: How do I click the buttons on forms in visual basic, using the web browser c
From: littleant-ga on 12 Oct 2005 01:55 PDT
 
WebBrowser1.Document.Forms(#).Elements(#).Click
should do the job.
You could combine this with other methodes to find the button like
using a for-loop to determine the ElementId with the Caption of the
button.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy