Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
com
QTP Functions
SUBROUTINES
Sub ClearCookies
wait (3)
End Sub
Sub CreateFiles
filetxt.WriteLine("<html><font face=Arial
color=blue><h3><b>2Step_1orMoreAcres_Attribute_145_100orMoreAcres  &n
bsp        " ) & Date&"<br>"
filetxt.WriteLine("</b></font></h3><br>")
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub ReportPass
filetxt.WriteLine("<br>")
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub ReportFail
filetxt.WriteLine("<font color=red>"&val&"<br>")
filetxt.WriteLine("<br>")
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub UpdateRun
dbConnection.Open("Driver={SQL
Server};Server=TAZ02MON901;Database=Automation")
dbConnection.Execute(sqlUpdateRun)
dbConnection.Close
'_______________________________________________________________________
_____________________________________________________________
Sub SendMail
Else
msgstr =
"2Step_1orMoreAcres_Attribute_145_100orMoreAcres Test Results:" &vbcrLf &"One or
more of the Test Cases Failed." &vbcrLf &"See attachment for details."
End If
objMessage.Subject = "~2Step_1orMoreAcres_Attribute_145_100orMoreAcres"
objMessage.From = "sam.harris@move.com"
'objMessage.To = "QA-Realtor@move.com"
objMessage.TextBody = msgstr
objMessage.AddAttachment (doc)
'_________________________________________________________________
_______________________________________________________________
'This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpserver") = (smtpServer)
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpauthenticate") = cdoNONE
'objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config
uration/sendusername") = "youruserid"
'objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config
uration/sendpassword") = "yourpassword"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpusessl") = False
'Connection Timeout in seconds (the maximum time CDO will try to establish a
connection to the SMTP server)
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpconnectiontimeout") = 60
objMessage.Configuration.Fields.Update
'_________________________________________________________________
_______________________________________________________________
objMessage.Send
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub SendMail2
Else
msgstr =
"2Step_1orMoreAcres_Attribute_145_100orMoreAcres Test Results:" &vbcrLf &"One or
more of the Test Cases Failed." &vbcrLf &"See attachment for details."
End If
objMessage.Subject = "~2Step_1orMoreAcres_Attribute_145_100orMoreAcres"
objMessage.From = "sam.harris@move.com"
For Software Testing Documents visit: ww.gcreddy.net 5
For QTP Scripts & Documents Visit: www.gcreddy.com
'objMessage.To = "sam.harris@move.com"
objMessage.To = "QA-Realtor@move.com"
objMessage.TextBody = msgstr
objMessage.AddAttachment (doc)
'_________________________________________________________________
_______________________________________________________________
'This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpserver") = (smtpServer)
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpauthenticate") = cdoNONE
'objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config
uration/sendusername") = "youruserid"
'objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/config
uration/sendpassword") = "yourpassword"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpserverport") = 25
'Connection Timeout in seconds (the maximum time CDO will try to establish a
connection to the SMTP server)
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configu
ration/smtpconnectiontimeout") = 60
objMessage.Configuration.Fields.Update
'_________________________________________________________________
_______________________________________________________________
objMessage.Send
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub AppendXL
ExcelObj.Visible = True
r=1
r=r+1
Loop
ExcelObj.DisplayAlerts = False
ExcelObj.Save
ExcelObj.Quit
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub ListCheck
strTextDesc=childObjs(Counter).GetROProperty("outerhtml")
'msgbox strTextDesc
'msgbox ListingCheck
'msgbox "Pass"
strFail= 0
Exit For
Else
'msgbox "Fail"
strFail = 1
End If
Next
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub GalleryCheck
strTextDesc=childObjs(Counter).GetROProperty("outerhtml")
'msgbox strTextDesc
'msgbox ListingCheck
'msgbox "Pass"
strFail= 0
Exit For
Else
'msgbox "Fail"
End If
Next
End Sub
'_______________________________________________________________________
_____________________________________________________________
Sub Mapcheck
strPnum = 0
strPropertyDesc = childObjs(strPnum).GetROProperty("outerhtml")
'msgbox strPropertyDesc
'msgbox ListingCheck
'msgbox "Pass"
strFail= 0
Exit For
Else
'msgbox "Fail"
strFail = 1
End If
'
strPnum =strPnum+1
End Sub
'_______________________________________________________________________
_____________________________________________________________
www.gcreddy.net