|
-
Feb 17th, 2010, 09:34 AM
#1
Thread Starter
Addicted Member
Auto Fill username and password
Hello guys!
I want to autofill the username and password field by my vb program. My Program contains webbrowser control
and needs to autofill and invoke the signin button.
I already have the experience with autologin of gmail,yahoo... But here my problem is i cant find the tag name or name of the field which i want to fill the value...
Here the url which i want to autofill : http://webuzz.im/mail/
Its just look like gadget something, how to do? any help would be appreciated!
Advance thanks
-
Feb 17th, 2010, 09:22 PM
#2
Re: Auto Fill username and password
you can fill the boxes like
vb Code:
wb.Navigate2 ("http://webuzz.im/mail") Do Until wb.readystate = 4 DoEvents Loop Set ele = wb.document.getelementbyid("login-box").document.getelementsbytagname("input") ele(0).Value = "pete" ele(1).Value = "password"
but filling them by code does not run the javascript to enable the sign in button
you can click the button like
vb Code:
Set ele = wb.document.getelementbyid("login-box").document.getelementsbytagname("button") ele(2).Click
but this will do nothing until the button is enabled
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 20th, 2010, 04:41 AM
#3
Thread Starter
Addicted Member
Re: Auto Fill username and password
First of all thanks and Sorry for late reply! Let me try out now and post...
-
Feb 20th, 2010, 05:10 AM
#4
Thread Starter
Addicted Member
Re: Auto Fill username and password
 Originally Posted by westconn1
you can fill the boxes like
vb Code:
wb.Navigate2 ("http://webuzz.im/mail")
Do Until wb.readystate = 4
DoEvents
Loop
Set ele = wb.document.getelementbyid("login-box").document.getelementsbytagname("input")
ele(0).Value = "pete"
ele(1).Value = "password"
but filling them by code does not run the javascript to enable the sign in button
you can click the button like
vb Code:
Set ele = wb.document.getelementbyid("login-box").document.getelementsbytagname("button")
ele(2).Click
but this will do nothing until the button is enabled
Your code is working perfectly, but need to enable the button to automate...
Is it any other way to enable the sign in button while form loading???
-
Feb 20th, 2010, 05:07 PM
#5
Re: Auto Fill username and password
turns out to be really simple
before the click
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|