04-11-2017, 11:39 AM
i was make a function for capturing screenshot and it will run properly, but my concern is to can i also pass image name and image url like dynamic. please review my code.
Class xyz
' Capture Screenshot
Function capture_bitmap(br,pg)
if browser ("title:="&br).page("title:="&pg).Exist(10) then
browser ("title:="&br).page("title:="&pg).CaptureBitmap "D:\way2sms\screenshot\login.bmp"
Reporter.Reportevent micPass,"success","data entry successful"
else
Reporter.Reportevent micfail,"fail","object identifiction unsuccessful "
End if
capture_bitmap="Screenshot Captured Successfully"
End Function
End class
Class xyz
' Capture Screenshot
Function capture_bitmap(br,pg)
if browser ("title:="&br).page("title:="&pg).Exist(10) then
browser ("title:="&br).page("title:="&pg).CaptureBitmap "D:\way2sms\screenshot\login.bmp"
Reporter.Reportevent micPass,"success","data entry successful"
else
Reporter.Reportevent micfail,"fail","object identifiction unsuccessful "
End if
capture_bitmap="Screenshot Captured Successfully"
End Function
End class