Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Thursday, 4 June 2015

How to clear the object from memory in UFT


Where objectName refers to the object you have created earlier.

Set objectName = Nothing

Note: At the end of script we need to write above statament.

Exmple:

'Create a new Microsoft Excel object
Set myxl = createobject("excel.application")

'To make Excel visible
myxl.Application.Visible = true 
  
myxl.Workbooks.Add
wait 2

'Save the Excel file as qtp.xls
myxl.ActiveWorkbook.SaveAs  "D:\qtp.xls"
     
'close Excel
myxl.Application.Quit

Set myxl=nothing

No comments:

Post a Comment

Note: only a member of this blog may post a comment.