Micro Focus QTP (UFT) Forums
what is the use of resetall? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: what is the use of resetall? (/Thread-what-is-the-use-of-resetall)



what is the use of resetall? - soumya - 12-02-2011

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


RE: what is the use of resetall? - supputuri - 12-02-2011

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).



RE: what is the use of resetall? - soumya - 12-02-2011

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



RE: what is the use of resetall? - supputuri - 12-04-2011

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.


RE: what is the use of resetall? - soumya - 12-04-2011

That is all supputuri. Thank you so much.