On Error Resume Next
strFolderPath = Split(Environment.Value("TestDir"),"Test Scripts")(0)
strDataTablePath = strFolderPath & "Local Test Data\\"
strFunLibrPath = strFolderPath & "Local Functions\"
strInputFile = strDataTablePath & "1.xls"
Environment.Value("RowNo") = 1
Environment.Value("SNo") = 1
Environment.Value("strResultFile") = ""
fnQTPConfigurationSettings() ' Sets the QTP Test Settings automatically
fnSetLoginCredentials(strInputFile) ' Sets the Login Credentials to Environment Variables☺
DataTable.AddSheet("GroupSelector")
DataTable.ImportSheet strInputFile,"GroupSelector","GroupSelector"
intActCount = Datatable.GetSheet("GroupSelector").GetRowCount
For index = 1 To intActCount
DataTable.GetSheet("GroupSelector").SetCurrentRow(index)
If DataTable.Value("Execute","GroupSelector") = "Y" Then
strGroupName = DataTable.Value("TestGroupName","GroupSelector") ' Sheet Name = Vbs file Name = GroupName
Environment.Value("GroupDescription") = DataTable.Value("GroupDescription","GroupSelector")
strGroupSheet = strGroupName
DataTable.AddSheet(strGroupSheet)
DataTable.ImportSheet strInputFile,strGroupName,strGroupSheet ' Loads the Input Data Sheet of required Group
Environment.Value("TestGroupName") = strGroupName
Environment.Value("CureentSheet")=strGroupName
Environment.Value("GPStatus") = "True"
' ExecuteFile strFunLibrPath&strGroupName&".vbs"
strFunName = strGroupName&"("&Chr(34)&strGroupSheet&Chr(34)&")"
Call Eval(strFunName) 'Runs the corresponding <strGroupName>.Vbs Main function ; which will run for Each testcase as mentioned in Corresponding sheet rows
If Environment.Value("GPStatus") = "True" Then
fnReportingManager "GPPass", "Execution Complete for Group : " & Environment.Value("TestGroupName"),Environment.Value("TestGroupName") ,"", Environment.Value("TestGroupName")
Else
fnReportingManager "GPFail", "Execution Complete for Group : " & Environment.Value("TestGroupName"),Environment.Value("TestGroupName") ,"", Environment.Value("TestGroupName")
' desktop.CaptureBitmap strFolderPath&"Result\"&strUseCaseName&".bmp", True
End If
DataTable.DeleteSheet(strGroupSheet)
End If
Next
Print "Done"
strFolderPath = Split(Environment.Value("TestDir"),"Test Scripts")(0)
strDataTablePath = strFolderPath & "Local Test Data\\"
strFunLibrPath = strFolderPath & "Local Functions\"
strInputFile = strDataTablePath & "1.xls"
Environment.Value("RowNo") = 1
Environment.Value("SNo") = 1
Environment.Value("strResultFile") = ""
fnQTPConfigurationSettings() ' Sets the QTP Test Settings automatically
fnSetLoginCredentials(strInputFile) ' Sets the Login Credentials to Environment Variables☺
DataTable.AddSheet("GroupSelector")
DataTable.ImportSheet strInputFile,"GroupSelector","GroupSelector"
intActCount = Datatable.GetSheet("GroupSelector").GetRowCount
For index = 1 To intActCount
DataTable.GetSheet("GroupSelector").SetCurrentRow(index)
If DataTable.Value("Execute","GroupSelector") = "Y" Then
strGroupName = DataTable.Value("TestGroupName","GroupSelector") ' Sheet Name = Vbs file Name = GroupName
Environment.Value("GroupDescription") = DataTable.Value("GroupDescription","GroupSelector")
strGroupSheet = strGroupName
DataTable.AddSheet(strGroupSheet)
DataTable.ImportSheet strInputFile,strGroupName,strGroupSheet ' Loads the Input Data Sheet of required Group
Environment.Value("TestGroupName") = strGroupName
Environment.Value("CureentSheet")=strGroupName
Environment.Value("GPStatus") = "True"
' ExecuteFile strFunLibrPath&strGroupName&".vbs"
strFunName = strGroupName&"("&Chr(34)&strGroupSheet&Chr(34)&")"
Call Eval(strFunName) 'Runs the corresponding <strGroupName>.Vbs Main function ; which will run for Each testcase as mentioned in Corresponding sheet rows
If Environment.Value("GPStatus") = "True" Then
fnReportingManager "GPPass", "Execution Complete for Group : " & Environment.Value("TestGroupName"),Environment.Value("TestGroupName") ,"", Environment.Value("TestGroupName")
Else
fnReportingManager "GPFail", "Execution Complete for Group : " & Environment.Value("TestGroupName"),Environment.Value("TestGroupName") ,"", Environment.Value("TestGroupName")
' desktop.CaptureBitmap strFolderPath&"Result\"&strUseCaseName&".bmp", True
End If
DataTable.DeleteSheet(strGroupSheet)
End If
Next
Print "Done"
Useful Blog towards QTP. Thanks QTP Training in Chennai
ReplyDeletethank you for your info
ReplyDeleteGood post, this institute seems dedicated to student success.
ReplyDeletefull stack developer java course
Nice Blog post ...Thanks for posting such an amazing content
ReplyDeleteDevOps Training institute in Ameerpet
"Enhance your data analytics skills with our power bi and tableau courses designed for beginners and professionals alike. Learn to create interactive dashboards, visualize data effectively, and make data-driven decisions with confidence."
ReplyDeleteAndroid training courses offer complete mobile development education.They focus on real-world applications.Practice boosts confidence.This Android training courses support professional goals.They are effective.
ReplyDeleteEasyPayTax simplifies taxation by offering professional GST, income tax, and business compliance services, ensuring smooth filings, reduced errors, and complete peace of mind.income tax filing services in Hyderabad
ReplyDelete