WinRunner to QTP migration notes (1)

Posted by Albert Gareev on Sep 10, 2008 | Categories: NotesTools

GUI Mapping

In general, QTP supports “GUI Map” concept introduced in WinRunner. GUI Maps are called “Object Repositories” and editable in “Object Repository Manager”. “GUI Spy” became “Object Spy”.

Two more things about Object Repositories:

  • it’s a real pain to copy/merge GUI objects across
  • checkpoint data included

Programming Language

C-like TSL used in WinRunner didn’t support Object-Oriented Programming paradigm.

With QTP we get Microsoft VBScript. Not-so-much Object-Oriented (no inheritance, overloading, etc.) but definitely more advanced scripting language.

GUI objects are now mapped to real classes, with properties and methods. Moreover, you can access a native class object (and its properties and methods)  too!

set_window is no longer needed but one might get bored with an endless notations like

Then use With.. statement:

With Browser(…).Page(…).Frame(…)
End With

“Descriptive Programming”

What was called in WinRunner as “addressing by physical description” (as opposed to logical name), in QTP is vaguely called Descriptive Programming.

Was: edit_set(“{html_class:html_edit, html_name:username}”)

Now: .WebEdit(“name:=username”)

Note: any value you provide in Descriptive Programming notation is considered RegEx, so escape special characters with backslash.

Warning: don’t ever make a mistake by putting extra space characters – it won’t find an object and you’ll get crazy trying to figure out the problem.

Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.