|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vbscript doubt on how to send the tab keystroke to website to find the button
Hi
I was trying to automate the login to website and filling the form thing Here is the code I tried: Code:
Set IE = CreateObject("InternetExplorer.Application")
set objShell = WScript.CreateObject("WScript.Shell")
IE.Navigate "website url here.asp"
IE.Visible = True
Wscript.Sleep 6000
WScript.Sleep 100
objShell.SendKeys "username"
WScript.Sleep 100
objShell.SendKeys "{TAB}"
WScript.Sleep 100
objShell.SendKeys "password"
WScript.Sleep 100
objShell.SendKeys "{ENTER}"
WScript.Sleep 100
objShell.AppActivate "IE"
objShell.SendKeys "{ENTER}"
WScript.Sleep 1000
objShell.SendKeys "{TAB}"
WScript.Sleep 100
objShell.SendKeys "{TAB}"
WScript.Sleep 100
objShell.SendKeys "{TAB}"
WScript.Sleep 100
objShell.SendKeys "{TAB}"
WScript.Sleep 100
'objShell.SendKeys "{ENTER}"
'WScript.Sleep 500
'objShell.SendKeys "{TAB}"
'objShell.SendKeys "{TAB}"
'objShell.SendKeys "{TAB}"
'objShell.SendKeys "{TAB}"
The above seems to be working fine and I can login to the website, but after login its not using the tab keys to find the button to be clicked I know the button comes after 6 tab position Is there any other way to find the button to be clicked and click it automatically? Please help
__________________
Contact info: Primary email: advanced.programmer@gmail.com MSN/email: superprg@hotmail.com AIM: superprg |
|
#2
|
|||
|
|||
|
This is more a client-side scripting issue it appears. I guess you're using IE only?
Anyway, I have no idea how to do what you want. Try finding the IE object model in the msdn library and perhaps you can find how to query IE object names.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Vbscript doubt on how to send the tab keystroke to website to find the button |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|