dynamic instantiation

This special syntax is called a dynamic instantiation and is composed of the class and tag or locator of the object. For example, if there is not a declaration for the Find dialog box of the Text Editor application, the syntax required to identify the object looks like the following:
  • Classic Agent:
    MainWin("Text Editor|$D:\PROGRAM FILES
       \<SilkTest install directory>\SILKTEST\TEXTEDIT.EXE").DialogBox("Find")
  • Open Agent:
    /MainWin[@caption='Untitled - Text Editor']//DialogBox[@caption='Find']
The general syntax of this kind of identifier is:
  • Classic Agent:
    class("tag").class("tag"). ...
  • Open Agent:
    class('locator').class('locator'). ...

With the Classic Agent, the recorder uses the multiple-tag settings that are stored in the Record Window Declarations dialog box to create the dynamic tag. In the Classic Agent example shown above, the tag for the Text Editor contains its caption as well as its window ID. For additional information, see About Tags.