Options Object
Description
Represents the GUI Testing tab of the Options dialog box and other tools that enable you to configure options that apply to all GUI tests and business components.
Object Model
Options Object ActiveScreenOptions Object WebActiveScreen Object JavaOptions Object ObjectIdentification Object TestObjectClassIdentification Object RunOptions Object AutoExportReportConfigOptions Object ScreenRecorderOptions Object SAPOptions Object SRFConnectionOptions Object TEOptions Object WebOptions Object WSOptions Object WindowsAppsOptions Object
Remarks

You can click the Generate Script button in the GUI Testing tab > General pane of the Options dialog box to automatically generate an automation script containing the current global testing options. 

The options in the GUI Testing tab are divided between the various panes in the tab. This object also includes a property that returns the Object Identification dialog box.

Example
'************************************************************************************************************************
'Description:
'
'This example opens UFT and configures the Terminal Emulator options.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTeOptions 'As QuickTest.TeOptions ' Declare the TE Options object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("Terminal Emulators") ' Activate the Terminal Emulator Add-in
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible
Set qtTeOptions = qtApp.Options.TE ' Return the TE Options object

' Configure the Terminal Emulator options

' Set global Terminal Emulator options (apply to all emulators)

qtTeOptions.ScreenTitleRow = 1 ' Set the screen title location
qtTeOptions.ScreenTitleCol = 1
qtTeOptions.ScreenTitleLength = 30
qtTeOptions.AutoAdvance = False ' Specifies that the emulator does not support auto-advance fields
qtTeOptions.AutoSyncKeys = "13" ' Record a Sync step each time the Enter key is pressed while recording the test
qtTeOptions.RecordMenusAndPopups = True 'Enable recording of emulator popups and menus
qtTeOptions.RecordCursorPosition = True 'Record cursor position steps
qtTeOptions.UsePropertyPattern = True ' Use default property pattern file
qtTeOptions.PropertyPatternsFile = "C:\Program Files\Micro Focus\Unified Functional Testing\Dat\PropertyPatternConfigTE.xml"

' Specify the current emulator
qtTeOptions.CurrentEmulator = "Host On-Demand 8.0" ' Set the current emulator as Host On-Demand 8.0

' Set options that are specific to the current emulator
qtTeOptions.Protocol = "autodetect" 'Let UFT detect the session protocol
qtTeOptions.BlankLines = 0 ' No blank lines at the bottom of the emulator window.
qtTeOptions.CodePage = 0 ' Use the default code page conversion
qtTeOptions.HllapiDllName = "C:\Program Files\IBM\EHLLAPI\pcshll32.dll" ' Specify the HLLAPI dll to use
qtTeOptions.HllapiProcName = "hllapi" ' Specify the HLLAPI function to use
qtTeOptions.VerifyHllapiDllPath = True ' Display a warning message if the HLLAPI dll is not found
qtTeOptions.ScreenLabelUseAllChars = True ' Use protected and unprotected fields to identify the screen label.
qtTeOptions.WindowTitlePrefix = "MyTerminal" ' Identify the terminal window based on its window title prefix.
qtTeOptions.TrailingMode = True ' Trim white characters when recording in context-sensitive mode
qtTeOptions.TrailingFieldLength = 5 ' if the field begins with more than five black characters.
qtTeOptions.BeepOnSync = False ' Do not beep after each Sync step.
qtTeOptions.UseKeyEvent "@R", "17;52" ' Replay the TE_RESET key using the CTRL+R keyboard event.
qtTeOptions.SyncTime = 200 ' Wait 200 milliseconds before checking the emulator status

' Clean up
Set qtTeOptions = Nothing ' Release the TE Options object ' Release the Te Options object
Set qtApp = Nothing ' Release the Application object ' Release the Application object
Example
Public Methods
Public Method RestoreLayout Restores the window's size and layout.
Public Method RestoreToFactoryDefaultSettings Restore GUITest settings to factory defaults
Public Properties
Public Property AbbyOcrLanguages The languages to use for text recognition when using the Abby OCR engine.
Public Property ActiveScreen Returns the ActiveScreenOptions object, which enables you to set your Active Screen preferences.
Public Property AutoGenerateWith Indicates whether 'With' statements are automatically generated after recording.
Public Property AutoParameterizeSteps Indicates whether test steps are automatically parameterized when you finish a recording session.
Public Property AutoParameterType The type of parameter to be used for all automatically parameterized steps.
Public Property DisableVORecognition Indicates whether recognition of virtual objects is disabled.
Public Property DisplayKeywordView Indicates whether the Keyword View will be displayed when a test or scripted component opens.
Public Property Java Returns the JavaOptions object, which enables you to set Java-specific options for all tests.
Public Property ObjectIdentification Returns the ObjectIdentification object, which enables you to manage test object class descriptions.
Public Property Run Returns the RunOptions object, which enables you to set run options for all tests and business components.
Public Property SAP Returns the SAPOptions object, which enables you to configure how UFT tests SAP applications.
Public Property SaveLoadAndMonitorData Indicates whether to save integration data with tests and business components.
Public Property SRFConnection Returns the SRFConnectionOptions object, which enables you to set SRFConnection-specific options for all tests.
Public Property TE Returns the TEOptions object, which enables you to configure how UFT records and runs steps on terminal emulator applications.
Public Property TesseractOcrConfigFile The path to the Tesseract config file.
Public Property TesseractOcrConfigMode Enables you to specify that UFT uses the default Tesseract configuration or load configuration from a config file.
Public Property TesseractOcrLanguageData The language pack to use for text recognition when using the Tesseract OCR engine.
Public Property TesseractOcrTesseractOnlyMode Enables you to specify the mode for text recognition.
Public Property TesseractOcrWhitelist The symbols to use for text recognition when using the Tesseract OCR engine.
Public Property TesseractTessdata The path to get the test data.
Public Property TextRecognitionBlockType Indicates whether the text block recognition mode is set to single text block or multiple text block.
Public Property TextRecognitionImagePreprocessing Indicates whether image preprocessing is enabled when performing text recognition.
Public Property TextRecognitionOcrMechanism The OCR mechanism to use.
Public Property TimeToActivateWinAfterPoint The number of tenths of a second after which to activate a window when pointing to it.
Public Property Web Returns the WebOptions object, which enables you to configure how UFT records and runs steps on Web applications.
Public Property WebServices Returns the WSOptions object, which enables you to configure how UFT tests Web services applications.
Public Property WindowsApps Returns the WindowsAppsOptions object, which enables you to configure how UFT records and runs steps on Windows-based applications.
Public Property WithGenerationLevel The minimum number of identical, consecutive objects for which a 'With' statement will be generated.
See Also