473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VBscript Web Form Automation


I'm trying to create a vbscript so that I can autologin and
get my tasks done unattended. As part of my code, I'm trying
to click to get the vbscript to click the "Login" button but
I'm always getting that error mentioned below. The unusual
thing about it is that the login and password fields are
filled but the line of code where it's supposed to click the
login button returns an error code rather than logging on
to the site. Please help.

Here's the code:

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "website"
IE.Visible = True
Wscript.Sleep 8000
IE.Document.All.Item("username").Value = "loginname"
IE.Document.All.Item("password").Value = "password"
IE.Document.All.Item("Login").Click

And here's the error:
Script: <nameoffile.vbs>
Line: 7
Char: 1
Error: Object Required: 'IE.Document.All.Item(..)'
Code: 800A01A8
Source: Microsoft VBScript runtime error

Jul 17 '05 #1
2 33231

<dr***@umuc.edu> wrote in message
news:0T8yb.22007$yM6.14908@lakeread06...

I'm trying to create a vbscript so that I can autologin and
get my tasks done unattended. As part of my code, I'm trying
to click to get the vbscript to click the "Login" button but
I'm always getting that error mentioned below. The unusual
thing about it is that the login and password fields are
filled but the line of code where it's supposed to click the
login button returns an error code rather than logging on
to the site. Please help.

Here's the code:

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "website"
IE.Visible = True
Wscript.Sleep 8000
IE.Document.All.Item("username").Value = "loginname"
IE.Document.All.Item("password").Value = "password"
IE.Document.All.Item("Login").Click

And here's the error:
Script: <nameoffile.vbs>
Line: 7
Char: 1
Error: Object Required: 'IE.Document.All.Item(..)'
Code: 800A01A8
Source: Microsoft VBScript runtime error


Just a guess: the login button is not named "Login". Your seventh line
of code references a control in the All collection by name:
All.Item("Login"). If that is not the name of the button object, it
would return Nothing, and you would get an "Object Required" error when
you tried to invoke its Click method.

Jul 17 '05 #2
A well written page expects case sensitivity.

What you get with javascript or jscript.

Then you decide to use form tag.

Or not.

If not. Another document.all whatever takes over.



<dr***@umuc.edu> wrote in message news:0T8yb.22007$yM6.14908@lakeread06...

I'm trying to create a vbscript so that I can autologin and
get my tasks done unattended. As part of my code, I'm trying
to click to get the vbscript to click the "Login" button but
I'm always getting that error mentioned below. The unusual
thing about it is that the login and password fields are
filled but the line of code where it's supposed to click the
login button returns an error code rather than logging on
to the site. Please help.

Here's the code:

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "website"
IE.Visible = True
Wscript.Sleep 8000
IE.Document.All.Item("username").Value = "loginname"
IE.Document.All.Item("password").Value = "password"
IE.Document.All.Item("Login").Click

And here's the error:
Script: <nameoffile.vbs>
Line: 7
Char: 1
Error: Object Required: 'IE.Document.All.Item(..)'
Code: 800A01A8
Source: Microsoft VBScript runtime error

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tash Robinson | last post by:
Hi I am kind of new to active-x programming, and need a point in the right direction. I have an active-x control that I wrote in VB6. I wrote a testbed in VB and everything seems to work OK....
6
by: ASPfool | last post by:
Hello everyone, Please help me before I throw my computer out of the window: I'm working on a web application in classic ASP (vbscript), which is making calls to some webservices. The calls...
3
by: Joe Caverly | last post by:
Hi, I'm using Visual C++ 32-bit Professional Edition 5.0 Using Microsoft Knowledge Base Article 181473 as a basis, I'm trying to transform this VB Code; Dim sc As Object Dim code As String...
2
by: The Truth | last post by:
All, I would like to write a DLL with a few function that are not available in WMI. I know how to write a dll but is there anything special that I must add to it if I want to be able to you the...
0
by: keys4worship | last post by:
I have a datagrid that contains among other things an SSN and a button. I have added an onclick attribute to the button that works with vbscript to query information on 3270 Pcomm emulator. The...
3
by: Drwtsn32 | last post by:
Hi Guys, I'm ripping off all of my hair soon ;-) I'm trying to do a very simple C# form accessible from COM client like VBScript. I would like to display the form and update the form during...
4
by: client site dll in vbscript | last post by:
Hi i have one dll on client site,i want to use it in aspx page, on clinet site Is it possible or not .Please tell me the solution Please email me at indipren@hotmail.com Regarda Indi
1
by: David C | last post by:
Can I use VBScript in a aspx page similar to using Javascript for running client code? I assume it would be used in a <scriptblock. This is for a controlled intranet internal application and I'd...
5
ravioliman
by: ravioliman | last post by:
How do I execute a vbs subroutine from php. I found this on the web and is in my php code: $scripter = new COM("MSScriptControl.ScriptControl"); $scripter->Language = "vbscript"; $k =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.