Micro Focus QTP (UFT) Forums

Full Version: what is the use of resetall?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good evening everybody

I have come across a method called 'resetall' . can you please explain its
use and also cite an example where it is put best to use?
Thank you so much
HI Soumya,

generally we will use this method to rest the object identification properties to default settings. Can you please let me know where exactly you got this method (as we can use it in different places), So that we can provide more info. If possible please share the LOC (Line of code).
Hi supputuri,
please check the text in bold. The following is a script to show all property objects from a browser and report it in a log.
Code:
Set oDesc=Description.Create  
  
Set qtApp = CreateObject("QuickTest.Application")  
Set qtIdent = qtApp.Options.ObjectIdentification  
[b]qtIdent.ResetAll  
[/b]  
set objList=browser("micclass:=Browser").page("micclass:=Page").ChildObjects(oDesc)  
  
For iCounter=0 to objList.count-1  
objList(iCounter).highlight  
oClassName=objList(iCounter).getroproperty("micclass")  
  
Set qtObject = qtIdent.Item(oClassName)  
set PropColl=qtObject.AvailableProperties  
print "*******************************************************"  
For oPropCount=1 to PropColl.count  
  print PropColl.item(oPropCount) & ":="& objList(iCounter).getroproperty(PropColl.item(oPropCount))  
Next  
print "*******************************************************"  
Next
HI Soumya,

Thanks for sharing the code.
Yeah, As I mentioned earilier we are re-setting the object identification properties to default.

We have created hte QTP object in first 2 lines and then re-setted the in line line 3.
Let me know if you need any futher info.
That is all supputuri. Thank you so much.