Sunday, August 23, 2015

main driver

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"

7 comments:

  1. Good post, this institute seems dedicated to student success.
    full stack developer java course

    ReplyDelete
  2. Nice Blog post ...Thanks for posting such an amazing content
    DevOps Training institute in Ameerpet

    ReplyDelete
  3. "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."

    ReplyDelete
  4. Android 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.

    ReplyDelete
  5. EasyPayTax 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