Automate Data-entry in IE application

V

Venkatesh V

Hi,

My requirement is to automate redudant data-entry process

1 ) i enter data from excel sheet (from several columns) onto an IE
application (into its fields) and press SUbmit

2) and, copy data from web applications' fields onto an excelsheet (into
specified columns).

the above two things -- doing it manually.


I am very well aware that Excel macro can do such operations quite easilty
(almost like an web automation).

So, Could you please help me in this case.

Please provide me an example.

Regards,
Venkat
 
V

Venkatesh V

HI All,

I tried to enter a usename & passsword in a web-page edit field.

but, it throws the error stating that "Object doesnt support this property
or method"

some of the code looks like this (in Source of page)

"encodePassword(window.document.clogin.password.value); "

<TR>
<TD ALIGN=right VALIGN=center>
<B>User Name:</B>
</TD>
<TD COLSPAN=2>
<INPUT TYPE=TEXT SIZE=30 NAME=user>
</TD>
<TD > </TD>
</TR>
<TR>
<TD ALIGN=right VALIGN=center>
<B>Password:</B>
</TD>
<TD COLSPAN=2>
<INPUT TYPE=PASSWORD SIZE=30 NAME=password>
</TD>
<TD> </TD>
</TR>
<SCRIPT LANGUAGE="JavaScript1.1">

window.document.write("<TR>");
window.document.write("<TD ALIGN=right VALIGN=center>");
window.document.write("<B>Database:</B>");
window.document.write("</TD>");
window.document.write("<TD COLSPAN=2>");

-------------------------------------------------------------------------------------

thsi is code that i tried writting it


Set appIE = CreateObject("InternetExplorer.Application")
appIE.Visible = True
sURL = "http://sindcsdbtd2.sg.db.com:8601/cs"

'get web page
appIE.Navigate sURL
Do While appIE.readyState <> 4
DoEvents
Loop

With appIE
.Navigate sURL
' uncomment the line below if you want to watch the code execute, or for
debugging
'.Visible = True
End With

' loop until the page finishes loading
Do While appIE.Busy
Loop

appIE.Document.getElementsByName("username").Value = "DEV-DSL-QA"
' enter username and password in textboxes
'Set UserN = appIE.Document.getElementsByName("User Name:")
'If Not UserN Is Nothing Then
' UserN(0).Value = "DEV-DSL-QA"
'End If

Set PW = appIE.Document.getElementsByName("Password:")
' password
If Not PW Is Nothing Then
PW(0).Value = "password"
End If

' click 'Submit' button
Set ElementCol = appIE.Document.getElementsByTagName("INPUT")

For Each btnInput In ElementCol
If btnInput.Value = "useCurrentWindow" Then
btnInput.Click
Exit For
End If
Next btnInput

' loop until the page finishes loading
Do While appIE.Busy
Loop

' click a button on the next page
Set ElementCol = appIE.Document.getElementsByTagName("INPUT")

For Each btnInput In ElementCol
If btnInput.Value = "Login" Then
btnInput.Click
Exit For
End If
Next btnInput



Thanks & Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top