In your tests, you can use the Options
objects to get access to:
-
Some of the properties of your current TestComplete project.
-
Internet Explorer settings.
-
Script extension options specified in the extension’s description.xml file. Use the object to access options of the script extension’s source code. For more information on this, see the Option topic.
The Code Completion window of the Code Editor displays the list of properties (options) available for the Options
object.
These properties are organized into the following groups:
FlashSettings
The FlashSettings group provides access to the Flash player settings that you may need to configure before testing Flash and Flex applications with the debug version of Flash Player. For information about the available settings, see FlashSettings Object.
IESettings
The IESettings group provides access to Internet Explorer settings that are displayed on the Advanced page of Internet Explorer’s Tools | Options dialog. For more information about available settings, see IESettings Object.
IEZoneSettings
The IEZoneSettings property of the Options
object returns the IEZoneSettingsManager
object that is used to provide a scripting interface to settings of Internet Explorer security zones. See the object description.
Images
This group provides access to image settings. These settings effect the format of images that are saved into the Stores | Regions collection (such as image checkpoints) or posted to the test log.
The Images property is obsolete. To specify the image format in which images will be posted to test log, configure your project properties. |
Property | Description |
---|---|
GIFColorReduction |
The Color reduction option, which is available if Image format is set to GIF Format. String. Read/write. Possible values are:
|
GIFDitherMode |
The Dither mode option, which is available if Image format is set to GIF Format. String. Read/write. Possible values are:
|
ImageFormat |
The Image format option. Specifies the format that is used to post images to the test log. String. Read/write. Possible values are “BMP”, “JPEG”, “PNG”, “TIFF”, “ICO” or “GIF”. |
ImageColorPalette |
The Image color palette option, which is available if Image format is set to BMP Format. String. Read/write. Possible values are:
|
JPEGImageOutput |
Specifies whether the JPEG images posted to the log are color or grayscale. String. Read/write. Possible values are “Color” and “255 shades of gray”. |
JPEGPixelFormat |
String. Read/write. Possible values are “8-bit” (if the Gray Scale check box is selected) and “24-bit” (if Gray Scale is unselected). |
JPEGQuality |
The Compression quality option, which is available if Image format is set to JPEG Format. Integer. Read/write. Possible values are 1 … 100. |
JavaOpenApps
The JavaOpenApps group is available only if the Java Application Support support is enabled in TestComplete. It provides access to the Open Applications > Java project properties.
Property | Description |
---|---|
DoNotRecognizeChildSWTAsParent |
Provides a scripting interface to the “Do not recognize child windows of an SWT control as the same SWT control” setting. Boolean. Read/write. |
OpenApps
The OpenApps group provides access to one of the Open Applications > General project properties.
Property | Description |
---|---|
InvokeTimeout |
Provides a scripting interface to the “Method invoke timeout” setting. Integer. Read/Write. |
Packer
This group provides access to one of the options displayed in the Packer Options dialog.
Property | Description |
---|---|
CmdLine |
Command line option. String. Read-Only. Note that the file path must be enclosed in double quotes and separated from the first command-line parameter by at least one space. For instance, "C:\Archivers\Arj.exe" a -+ -r -y -a1 -p -- %%a !%%LM". |
Project
The Project group provides access to project options:
Property | Description | ||
---|---|---|---|
General |
Provides a scripting interface to the General group project options. Currently, the object has only one property:
|
||
TreeModel |
Same as General.TreeModel (see the paragraph above).
|
Run
This group provides access to the Playback project properties.
Property | Description |
---|---|
CaseSensitive |
Use case-sensitive parameters option. Boolean. Read-only. |
ClickOnButton |
Click on focused control option in the On Unexpected Window group. Boolean. Read-only. |
Delay |
Delay between events option. Integer. Read/write. |
ErrorDialog |
Show a notification when an unhandled script exception occurs option. Boolean. Read-only. |
IgnoreOverWindow |
Ignore overlapping window option in the On Overlapping Window group. Boolean. Read-only. |
ObjectSearchStrategy |
Object search strategy option. String. Read-write. Possible values:
You can use both constants and their string values: JavaScript, JScript Options.Run.ObjectSearchStrategy = searchDepthFirst; // or Consts.searchDepthFirst Python Options.Run.ObjectSearchStrategy = searchDepthFirst # or Consts.searchDepthFirst VBScript Options.Run.ObjectSearchStrategy = searchDepthFirst ' or Consts.searchDepthFirst DelphiScript Options.Run.ObjectSearchStrategy := searchDepthFirst; // or Consts.searchDepthFirst C++Script, C#Script Options["Run"]["ObjectSearchStrategy"] = searchDepthFirst; // or Consts["searchDepthFirst"] |
PressEnter |
Press Enter option in the On Unexpected Window group. Boolean. Read-only. |
PressEsc |
Press Esc option in the On Unexpected Window group. Boolean. Read-only. |
SendWMClose |
Send the close command option in the On Unexpected Window group. Boolean. Read-only. |
StopOnUnexpWindow |
Stop execution option in the On Unexpected Window group. Boolean. Read-only. |
StopOnError |
This property is obsolete. It is supported for backward compatibility only. Error handling > On error project property. Boolean. Read-only. If the project property is set to Continue running, returns false. Otherwise, returns true. |
StopOnRecognitionError |
This property is obsolete. It is supported for backward compatibility only. Error handling > On object recognition error project property. Boolean. Read-only. If the project property is set to Continue running, returns false. Otherwise, returns true. |
StopOnWarning |
This property is obsolete. It is supported for backward compatibility only. Error handling > On warning project property. Boolean. Read-only. If the project property is set to Continue running, returns false. Otherwise, returns true. |
Timeout |
Auto-wait timeout option. Integer. Read/write. |
Visualizer
This group provides access to the Visualizer project properties.
Property | Description | ||
---|---|---|---|
CollectMode |
Collect Test Visualizer data during test run option. String. Read/write. Possible values are:
JavaScript, JScript // Set the option to "Off" Python # Set the option to "Off" VBScript ' Set the option to "Off" DelphiScript // Set the option to "Off" C++Script, C#Script // Set the option to "Off" |
Web
The Web group is available only if the Web Testing is enabled in TestComplete. It provides access to the Open Applications > Web Testing project properties.
Property | Description | ||
---|---|---|---|
CSSTransitionForPagePicture |
Specifies whether the Page.PagePicture method uses CSS transition when scrolling a web page. Boolean. Default value is True.Use the option to specify how “sticky” elements (elements with a fixed position) should appear in the visible area of the page while the Known Issue: The CSS transition may not work on pages opened in Internet Explorer or applications that use Chromium Embedded Framework versions prior to 3.2171. For such pages, elements with fixed positions may remain in the visible area of the page when scrolling, and the captured image will have those elements repeated.
|
||
IdentificationAttribute |
Identification attribute option. String. Read/write. Possible values are “ID” and “Name”. | ||
TreeModel |
Tree model option. String. Read/write. Possible values are “Tree”, “DOM”, “Tag”, and “Hybrid”.
All the models except for the Tree model are obsolete. They are supported for the backward compatibility only. We do not recommend that you use them in your tests. JavaScript, JScript Options.Web.TreeModel = "Tree"; // Set the Tree model Python Options.Web.TreeModel = "Tree" # Set the Tree model VBScript Options.Web.TreeModel = "Tree" ' Set the Tree model DelphiScript Options.Web.TreeModel := 'Tree'; // Set the Tree model C++Script, C#Script Options["Web"]["TreeModel"] = "Tree"; // Set the Tree model |
||
WebPageLoadingTimeout |
Web page loading timeout option. Integer. Read/write. |
See Also
TestComplete Options
Project Properties
TestComplete Helper Objects