On Error Resume Next
'SerialNumber=0
Function CheckExecutionFlag()
strExFlag=Ucase(datatable.Value("EXECUTE"))
If ucase(strExFlag)="X" Then
CheckExecutionFlag=Datatable.GetCurrentRow
End If
End Function
CurrentRow=CheckExecutionFlag()
datatable.SetCurrentRow(CurrentRow)
TotalRows=Datatable.GetRowCount
'Function TakeSnap(IterationFolder)
'
'SerialNumber=SerialNumber+1
'Filename=IterationFolder&"\"&SerialNumber&"."&"png"
'desktop.CaptureBitmap Filename,False
'
'End Function
'
IterationFolder=objectname.LocalResultsParent&"\"&CurrentRow&" Iteration"
CreateFolder(IterationFolder)
'CurrentRow=CheckExecutionFlag()
IterationFile=IterationFolder&"\"&CurrentRow&"."&"html"
objectname.IterationFile=IterationFile
CreateFile(IterationFile)
objectname.WriteHeader IterationFile
objectname.IterationFolder=IterationFolder
If not isNumeric(CurrentRow) Then
Else
Systemutil.Run "Chrome.exe","https://opensource-demo.orangehrmlive.com"
'objectname.WriteReport "0","Launched Browser"
objectname.ReportEvent1 "0","Launched Browser","Launched Browser"
'Browser("Rediff.com: Online Shopping,").FullScreen
'TakeSnap IterationFolder
'Browser("Rediff.com: Online Shopping,").Page("Rediff.com: Online Shopping,").Link("Sign in").ClickNew
'objectname.WriteReport "Pass","Signin Page"
'
'TakeSnap IterationFolder
'Browser("Rediff.com: Online Shopping,").Page("Rediffmail").WebEdit("login").SetNew "W_USERNAME"
'Browser("Rediff.com: Online Shopping,").Page("Rediffmail").WebEdit("passwd").Set "W_PASSWORD"
'objectname.WriteReport "Pass","Signin page shwon"
'TakeSnap IterationFolder
'Cleanup()
'End If
'Browser("Rediff.com: Online Shopping,").Page("Rediffmail").WebButton("Go").Click
'Next
'Set ObjFSO=CreateObject("Scripting.FileSystemObject")
'Function OpenFileForWriting(strFilename)
' Set ObjFSO=CreateObject("Scripting.FileSystemObject")
' ObjFSO.
'
'
' End If
'Set ObjFSO=Nothing
'
'End Function
Login()
Function Login()
Browser("Rediff.com: Online Shopping,").Page("OrangeHRM").WebEdit("txtPassword").SetNew "W_PASSWORD"
Browser("Rediff.com: Online Shopping,").Page("OrangeHRM").WebEdit("txtUsername").SetNew "W_USERNAME"
'TakeSnap IterationFolder
Browser("Rediff.com: Online Shopping,").Page("OrangeHRM").WebButton("Login").ClickNew
If Browser("Rediff.com: Online Shopping,").Page("OrangeHRM").Link("Welcome Admin").Exist(60) Then
Browser("Rediff.com: Online Shopping,").Page("OrangeHRM").Sync
'objectname.WriteReport "Pass","Signin Success"
objectname.ReportEvent1 "0","Login Step","Login Success"
'Launched Browser
' Reportevent
'ReportEvent "PASS","steep","test"
'TakeSnap IterationFolder
Else
' objectname.WriteReport "FAIL","Signin FAIL"
objectname.ReportEvent1 "1","Login Step","Login Failed"
'TakeSnap IterationFolder
End If
End Function
'msgbox IterationFolder
filename= IterationFolder&"\"&"Data"&"."&"xls"
Datatable.Export cstr(filename)
'msgbox err.Description
Cleanup()
objectname.iIndex=1
objectname.SerialNumber=0
'Browser("Rediff.com: Online Shopping,").ClearCache
'Browser("Rediff.com: Online Shopping,").DeleteCookies
'strWND=Browser("Rediff.com: Online Shopping,").Object.HWND
'Window("hwnd="&strWND).maximize
End If
'
'strWND=Browser("Rediff.com: Online Shopping,").GetROProperty("hwnd")
'Window("hwnd="&strWND).maximize
'