Generated automation scripts

Relevant for: GUI tests and components

The Properties pane of the Test Settings dialog box, the General node of the pane of the GUITesting tab in the Options dialog box, and the Object Identification dialog box each contain a Generate Script button. Clicking this button generates an automation script file (.vbs) containing the current settings from the corresponding dialog box.

You can run the generated script as is to open UFT with the exact dialog box configuration of the UFT application that generated the script, or you can copy and paste selected lines from the generated files into your own automation script.

For example, the generated script for the Options dialog box may look something like this:

Dim App 'As Application
Set App = CreateObject("QuickTest.Application") 
App.Launch
App.Visible = True
App.Options.DisableVORecognition = False
App.Options.AutoGenerateWith = False
App.Options.WithGenerationLevel = 2
App.Options.TimeToActivateWinAfterPoint = 500
...
...
App.Options.WindowsApps.NonUniqueListItemRecordMode = "ByName"
App.Options.WindowsApps.RecordOwnerDrawnButtonAs = "PushButtons"
App.Folders.RemoveAll

For more details on the Generate Script button and the options available in the Options, Object Identification, and Test Settings dialog boxes, see Configuring Object Identification, Global Options, andDocument Settings.