QTP Secrets - Undocumented Features



Get Text Location
  • Unidentified objects
  • Forced to use Object’s relative location using Get text location method.
    • Find = Window(“Login”).GetTextLocation (“OK” ,x1,y1,x2,y2)
    • If find =True Then
    •     Window(“Login”).Click (x1+x2)/2 ,(y1+y2)/2
    • End If
    • Window(“Login”).Clickontext “OK”,0,0,0,0,”false”,micRightbtn,”false”
Optional Steps
  • Comment code or delete it?
  • Object does not exist at runtime
  • What if QuickTest bypasses this step and continues to run
  • OptionalStep.Statement
  • Warning Message
Multiple tests
  • Want to open more than one test /Compare tests
  • Use the QTP Script editor (NOT the QTP IDE)
  • Start > Programs > QTP > Tools > Quick test Script editor
Stop QTP at x tests
  • Close Quick Test after runs
  • QTP tests run from QC
  • C:\Program Files\HP\QuickTest Professional\bin
  • Mic.ini
  • Edit change appropriate tags
  • [RemoteAgent]
  • CloseToolAfterRuns=
Reuse web objects after browser reloads
  • Parsing the DOM to find an element
  • Grab enough properties to make it unique
  • Build a description with those properties and finally get the right micobject
  • Reload the page, and my object is useless











How do you get qtp tips ?
  • QTP tips file
  • QTP installation Folder -->Dat --> Tips.txt

Comments

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?