PDA

Click to See Complete Forum and Search --> : Please...nedd help with filling out Webforms


Seeker
Feb 23rd, 2001, 10:06 PM
Hi all

I got a little problem with my Webbrowser. I want to let it fill out some Webforms by itself. Just the same as an Cookie, but stored in a Database. So how can I send the needet Text to the fields on a Webpage ? I wanna make it possible that my browser do all by itself e.g. fill out username and passwort. I got it work that it fills out normal textboxes and some Comboboxes. But if the Combobox has no Value, it doesnt work. Also I got a problem with the Buttons. If it is an normal button, I can easily click it, but what is the code to click a gif picture if it is the "button" ? Hope anyone can help me coz IŽm searching since a long time for a solution for that. For those who didnt understand what I mean:

To fill out a normal Textbox, I use:
Set objinput = webbrowser1.Document.All.tags("input")
objinput(6).Value = "whatever I want"

For a combobox with values:
Set objselect = webbrowser1.Document.All.tags("select")
objselect(0).Value = "an existing value"

For normal buttons:
webbrowser1.Document.Forms(0).Elements(24).Click

(The numbers in the"()" are the numbers of the elements on the Webpage.

Ok, I hope everyone has understod what I mean, and someone can help me with this. Thx for reading this post.

Seeker

P.S. sorry for my bad english

Hmpf
Feb 24th, 2001, 12:46 PM
tell me , how do u fill textboxes ?

what do u declare of the objinput ?

Seeker
Feb 24th, 2001, 01:33 PM
Well, as I wrote on my first post:

Set objinput = webbrowser1.Document.All.tags("input")
objinput(6).Value = "whatever I want"

You need a blank form and the webbrowser item. Now, if you want to fill out a Website which only have 3 Textboxes on it, use the code above, and just change the "6" into the number of the box you want to fill. If you wanna fill the first one (counting from the top to the end) you have to change it to "1" and so on.

Greetz

Seeker

Dim
Feb 25th, 2001, 03:59 AM
Webbrowser1.Navigate "http://www.mysite.com/form.cgi"
WebBrowser1.Document.Forms(0).boxname.Value = "My Text"
WebBrowser1.Document.Forms(0).proceed.Click
'box name and proceed are names of the input box and the submit button.

I hope that's what you were looking for, Gl,
D!m

Seeker
Feb 25th, 2001, 02:34 PM
Thank you for your help. IŽll check this out. This code seems to be that what I was looking for. Thx again for your support :D

Seeker

Hmpf
Feb 26th, 2001, 06:02 AM
you have helped me also.

but one thing , i have a button that is under a picture

and something with java script
and i cant find its name to click on

very wired

if u can check its the site
isend.cellcom.co.il

and it has two yellow buttons and i cant find the name of them

Hmpf
Feb 26th, 2001, 06:08 AM
i have a better idea , here is the source of the page

i need the picture click that does javascript=submitit

i need to run that script with vb

please help

10x

Seeker
Feb 26th, 2001, 12:36 PM
Hi. As I wrote in the first post, thats exactly what I wanna know, too. I got this problem with the "picture button" too. Well, IŽve tried your tips, but they dont work :( But there MUST be a solution for this. If we can click a normal button, it MUST be possible to click a picture button, too. I have postet on some other forums with this prob, and if I can find a solution, IŽll post it here.

Seeker