Set qtApp=GetObject("", "QuickTest.Application")
qtApp.Test.Settings.Run.IterationMode="oneIteration"
intRowCount=DataTable.GetSheet(<SheetID>).GetRowCount
intFailCounter=0
intPassCounter=0
For intCounter=1 To intRowCount
DataTable.SetCurrentRow intCounter
If DataTable(<AttributeID>, <SheetID>)="Pass" Then
intPassCounter=intPassCounter+1
Elseif DataTable(<AttributeID>, <SheetID>)="Fail" Then
intFailCounter=intFailCounter+1
End If
Next
MsgBox intFailCounter
MsgBox intPassCounter
Set qtApp=Nothinguse this code after completion of all testcases On Mon, Apr 16, 2012 at 6:10 PM, Deepak Kumar Mahapatro < [email protected]> wrote: > while exporting from datatable it exports only data not the styles we > applied in excel sheet but it imports those. > and before exporting the result you can count the no. of pass and no. of > fails > > > On Mon, Apr 16, 2012 at 10:04 AM, rags <[email protected]> wrote: > >> Hi All, >> >> Using parameterization concepts m trying to check the log in page, >> below is the script >> >> >> datatable.AddSheet "Login page parameterization-DMX" >> datatable.ImportSheet "D:\Rag's\DMX\Automation testing scripts >> \Automation test plan.xls",2,3 >> Datatable.ImportSheet "D:\Rag's\DMX\Automation testing scripts >> \Automation test plan.xls",1,4 >> Datatable.ImportSheet "D:\Rag's\DMX\Automation testing scripts >> \Automation test plan.xls",3,5 >> rc=datatable.GetSheet(3).GetRowCount >> 'msgbox rc >> >> For i=1 to rc >> datatable.GetSheet(3).SetCurrentRow(i) >> systemutil.Run "" >> >> wait(20) >> >> Browser("DMX Admin").Page("Login page").WebEdit("txtUserName").Set >> datatable("UN",3) >> Browser("DMX Admin").Page("Login page").WebEdit("txtPassword").Set >> datatable("PASSWORD",3) >> Browser("DMX Admin").Page("Login page").Image("Login").Click >> >> wait(10) >> >> If Browser("DMX Admin").Page("Control panel").Image("User >> Manager").exist Then >> Datatable("ACTUALRESULT",3)="Pass" >> else >> Datatable("ACTUALRESULT",3)="Fail" >> End If >> >> If Datatable("ACTUALRESULT",3)="Pass" Then >> Datatable("STATUS",3)="Pass" >> else >> Datatable("STATUS",3)="Fail" >> End If >> >> >> If Browser("DMX Admin").Exist Then >> Browser("DMX Admin").Close >> End If >> >> Next >> >> Datatable.ExportSheet "D:\Rag's\DMX\Automation testing scripts >> \Automation test plan-result.xls",3 >> datatable.ExportSheet "D:\Rag's\DMX\Automation testing scripts >> \Automation test plan-result.xls",4 >> datatable.ExportSheet "D:\Rag's\DMX\Automation testing scripts >> \Automation test plan-result.xls",5 >> >> >> Here i need script to count the total number of Test cases passes & >> Failed ? >> How to fill color for a cell Ex: if TC is passed then fill cell with >> green color & fail with Red color ? >> >> -- >> You received this message because you are subscribed to the Google >> "QTP - HP Quick Test Professional - Automated Software Testing" >> group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/MercuryQTP?hl=en >> > > > > -- > Regards, > Deepak > -- Regards, Deepak -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
