Jump to content

Recommended Posts

Posted

First off I'm not savvy on vbs or java for that matter so go easy please [emoji28]

 

There has been a few issues with exams on an online website where it did not record the exam data for our students. To receive a new exam code we need to log back into the accounts. We would like to know if there is a way to run a script to auto login these students using IE on lots of tabs.

 

Here is where I am at with a vbs script.

 

Option Explicit

 

Const navOpenInNewWindow = &h1

Const navOpenInNewTab = &h800

Const navOpenInBackgroundTab = &h1000

 

Dim intLoop : intLoop = 0

Dim intArrUBound : intArrUBound = 0

Dim navFlags : navFlags = navOpenInBackgroundTab

 

Dim arrstrUrl(3)

Dim objIE

 

intArrUBound = UBound(arrstrUrl)

 

arrstrUrl(0) = "https://www.testingforschools.com/code"

arrstrUrl(1) = "https://www.testingforschools.com/code"

arrstrUrl(2) = "https://www.testingforschools.com/code"

arrstrUrl(3) = "https://www.testingforschools.com/code"

 

set objIE = CreateObject("InternetExplorer.Application")

objIE.Navigate2 arrstrUrl(0)

 

For intLoop = 1 to intArrUBound

 

objIE.Navigate2 arrstrUrl(intLoop), navFlags

 

Next

 

objIE.Visible = True

set objIE = Nothing

 

 

 

I want to add this onto it but unsure where.

 

.getElementByID("AccessCode").value = "password"

.getElementByID("login").submit

End With

End Function

 

The website is included within the script above.

The script would need have a different "password" on each tab... If possible?

 

Thank you anyone for your welcomed support! [emoji106]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...