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
ReplyDeleteLearn data analytics with hands-on power bi and tableau courses that turns raw data into clear, actionable insights.
ReplyDelete"Boost your career with sfdc admin training designed for mastering Salesforce administration skills.
ReplyDelete"Enhance your data visualization skills with tableau training Learn to create interactive dashboards and insightful reports for smarter business decisions."
ReplyDelete"Enhance your career with sales force admin course designed to equip you with essential skills in managing and customizing Salesforce. Learn practical tools and best practices to become a certified Salesforce administrator."
ReplyDeleteGreat explanation! 👍 This article makes the concept of the main driver in QTP/UFT really easy to understand. The examples are clear and practical, and I especially liked how you showed the flow between the driver script and function libraries. Thanks for sharing — it’s very helpful for beginners learning how to structure their automation scripts!
ReplyDeleteDevops Training in Hyderabad
Nice blog ...Thanks for posting such an amazing content
ReplyDeleteDevops Institute in Ameerpet