02-11-2009, 02:47 PM
Hi I am trying to put Login and Password into Login window of flight application.
I am importing these values directly from database.
Agent NAme get inserted but password is not getting .
It gives following error
The operation cannot be performed.
My code is as below
I am getting error at following line
I am importing these values directly from database.
Agent NAme get inserted but password is not getting .
It gives following error
The operation cannot be performed.
My code is as below
Code:
dim con,rs
set con=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
con.open"provider=sqloledb.1;server=sudhirp;uid=sa;pwd=sa@123;database=First"
rs.open"select * from QTP",con
Do until rs.eof
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dim arr
i=0
arr=rs.fields("Login_name")
pwd=rs.fields("Password")
dialog("Login").Activate
dialog("Login").WinEdit("Agent Name:").Set arr
dialog("Login").WinEdit("Password:").Set pwd
dialog("Login").WinButton("OK").Click
If window("Flight Reservation").Exist Then
reporter.ReportEvent micPass,"Valid Password","Flight Reservation Window Exists"
else
reporter.ReportEvent micFail,"InValid Password","Flight Reservation Window doesn't Exists"
End If
window("Flight Reservation").Close
rs.movenext
Loop
rs.close
con.close
Set rs=nothing
Set con=nothing
I am getting error at following line
Code:
dialog("Login").WinEdit("Password:").Set pwd.