Run file
Dim qtApp
set qtApp=createobject("QuickTest.Application")
qtApp.Launch
qtApp.Visible=True
qtApp.Open "C:\Users\Sathish\Desktop\Test1", False, False
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "C:\Users\Sathish\Desktop\result"
Set qtTest = qtApp.Test
qtTest.Run qtResultsOpt
Datatable.ImportSheet "C:\Users\Sathish\Desktop\drivesheet.xls", 1, Global
'wait(10)
For i=1 to DataTable.GetRowCount
If DataTable.Value("Flag")= "Yes" Then
MsgBox "Row :"&i
End If
Next
Function Call1()
RepositoriesCollection.Add("C:\Users\Sathish\Desktop\or1.tsr")
Dialog("Login").WinEdit("Agent Name:").Set "hkjhkhks"
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure "5112969c4489964da9cd8c09bbcea478fb79b262"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111116"
Window("Flight Reservation").ActiveX("MaskEdBox").Type micTab
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Paris"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Activate "13534 FRA 08:00 AM PAR 11:30 AM SR $159.90"
Window("Flight Reservation").WinEdit("Name:").Set "kshfkshkshk"
Window("Flight Reservation").WinButton("Insert Order").Click
End Function
'Open QTP
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Launch
objQTP.Visible = True
'Open a test and associate a function library to the test
objQTP.Open "C:\Automation\SampleTest", False, False
Set objLib = objQTP.Test.Settings.Resources.Libraries
'If the library is not already associated with the test case, associate it..
If objLib.Find("C:\SampleFunctionLibrary.vbs") = -1 Then ' If library is not already added
objLib.Add "C:\SampleFunctionLibrary.vbs", 1 ' Associate the library to the test case
End
LoadFunctionLibrary "C:\YourFunctionLibrary_1.vbs" 'Associate a single function library
LoadFunctionLibrary "C:\FuncLib_1.vbs", "C:\FuncLib_2.vbs" 'Associate more than 1
Dim qtApp
set qtApp=createobject("QuickTest.Application")
qtApp.Launch
qtApp.Visible=True
qtApp.Open "C:\Users\Sathish\Desktop\Test1", False, False
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "C:\Users\Sathish\Desktop\result"
Set qtTest = qtApp.Test
qtTest.Run qtResultsOpt
Datatable.ImportSheet "C:\Users\Sathish\Desktop\drivesheet.xls", 1, Global
'wait(10)
For i=1 to DataTable.GetRowCount
If DataTable.Value("Flag")= "Yes" Then
MsgBox "Row :"&i
End If
Next
Function Call1()
RepositoriesCollection.Add("C:\Users\Sathish\Desktop\or1.tsr")
Dialog("Login").WinEdit("Agent Name:").Set "hkjhkhks"
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure "5112969c4489964da9cd8c09bbcea478fb79b262"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111116"
Window("Flight Reservation").ActiveX("MaskEdBox").Type micTab
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Paris"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Activate "13534 FRA 08:00 AM PAR 11:30 AM SR $159.90"
Window("Flight Reservation").WinEdit("Name:").Set "kshfkshkshk"
Window("Flight Reservation").WinButton("Insert Order").Click
End Function
'Open QTP
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Launch
objQTP.Visible = True
'Open a test and associate a function library to the test
objQTP.Open "C:\Automation\SampleTest", False, False
Set objLib = objQTP.Test.Settings.Resources.Libraries
'If the library is not already associated with the test case, associate it..
If objLib.Find("C:\SampleFunctionLibrary.vbs") = -1 Then ' If library is not already added
objLib.Add "C:\SampleFunctionLibrary.vbs", 1 ' Associate the library to the test case
End
LoadFunctionLibrary "C:\YourFunctionLibrary_1.vbs" 'Associate a single function library
LoadFunctionLibrary "C:\FuncLib_1.vbs", "C:\FuncLib_2.vbs" 'Associate more than 1
No comments:
Post a Comment