When you record test cases, Silk Test Classic uses the window declarations in the test frame file to construct a unique identifier, called a fully qualified identifier, for each GUI object. The fully-qualified identifier consists of the identifier of the object, combined with the identifiers of the object’s ancestors. In this way, the 4Test commands that are recorded can manipulate the correct object when you run your test cases.
If all identifiers were unique, this would not be necessary. However, because it is possible to have many GUI objects with the same identifier, for example the OK button, a method call must specify as many of the object’s ancestors as are required to uniquely identify it.
The following table shows how fully qualified identifiers are constructed:
|GUI Object||Fully-Qualified Identifier||Example|
|Main Window||The main window’s identifier||TextEdit.SetActive ()|
|Dialog||The dialog’s identifier||Find.SetActive ()|
|Control||The identifiers of the dialog and the control||Find.Cancel.Click ()|
|Menu item||The identifiers of the main window, the menu, and the menu item||TextEditor.File.Open.Pick ()|
The fully qualified identifier for main windows and dialog boxes does not need to include ancestors because the declarations begin with the keyword window.
An identifier is the GUI object’s logical name. By default, Silk Test Classic derives the identifier from the object’s actual label or caption, removing any embedded spaces or special characters (such as accelerators). So, for example, the Save As label becomes the identifier SaveAs. Identifiers can contain single-byte international characters, such as é and ñ.
If the object does not have a label or caption, Silk Test Classic constructs an identifier by combining the class of the object with the object’s index. When you are using the Classic Agent, the index is the object’s order of appearance, from top left to bottom right, in relation to its sibling objects of the same class. For example, if a text box does not have a label or caption, and it is the first text box within its parent object, the default identifier is TextField1. When you are using the Open Agent, the index depends on the underlying technology of the application under test.