Monday, 12 August 2013

Few secret methods of QTP objects

All QTP test objects have these five methods in common:
  1. Highlight – Highlights the object, much like the highlight feature in the object-repository.
  2. ToString – Returns a string representation of the object. Usually it’s just the name.
  3. Init – As described here, re-links the test-object to the runtime object. Especially useful in a web environment, after a page refresh. It works like method .RefreshObject
  4. MakeObjVisible - QTP sometimes throws error while acting upon an object which is not visible or not in focus. So to overcome such type of errors, we can use “.MakeObjVisible” method.
          Browser(“B”).Page(“P”).WebLink(“WL”).MakeObjVisible

No comments:

Post a Comment