Hi, I am trying to create a VB script to automatically complete the username and password fields and click the submit button on my webpage...i am getting an error with the 2nd to last line....
this is what i have thus far:
Option Explicit
With CreateObject("InternetExplorer.Application")
.Visible = True
.Navigate "http://mywebsite.com"Do While .Busy
WScript.sleep 100
Loop.Document.getElementsByName("j_username").Item(0).Value = "user1"
.Document.getElementsByName("j_password").Item(0).Value = "pasSWord1"
.Document.getElementsByID("j_security_check").Click()End With
Can anyone help !!!
Without an error message? No.
If you comment out your Option Explicit line, it should show you an error message. If that isn't enough, post the error message here and we'll try to help you out.
As a possible alternative, you can also login using biterscripting.# Script Login.txt isstart "a" "login" "Mozilla/4.0" isconnect "a" "http://mywebsite.com" isget "a" "login_form.php" ispost "a" "login=abc" "password=xyz" isdiscon "a" isend "a"This is just a sample script showing the sequence of commands you need to execute. If you had posted an exact website and the page, I would have been able to be more specific.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |