Project Properties - WPF Options

Applies to TestComplete 14.92, last modified on September 16, 2021
Information in this topic applies to desktop applications only.

The Open Applications > WPF group contains settings that affect how TestComplete works with WPF application objects. This group is available only if the WPF Control Support plugin is installed and enabled in File > Install Extensions.

To view or modify the WPF settings:

  • Open the Properties page of the project editor and then choose Open Applications > WPF from the tree on the left of the page.

TestComplete Project Properties - WPF

Click the image to enlarge it.

You can change the following options:

  • Simplified WPF object tree -- Specifies how TestComplete presents the object hierarchy in WPF applications. If this option is enabled, TestComplete omits the content layout containers (such as Panels, Borders, Decorators and others) from the object hierarchy, which reduces the nesting levels of tested objects corresponding to application controls, and improves the test readability. If this setting is disabled, TestComplete reflects the actual hierarchy of objects in the application, including intermediate container objects. For more information, see About Containers in the WPF Object Hierarchy.

    This option affects how TestComplete records object names and addresses object in WPF applications during playback. So, tests created with this option enabled may not play back correctly when the option is disabled, and vice versa.
  • The following settings let you enable access to template-generated elements of composite WPF controls, such as toolbars, list views, combo boxes and others (see Support for WPF Control Templates):

    • Composite controls - Holds a list of composite WPF controls whose internal elements TestComplete should expose. An example of a composite control is a toolbar object consisting of several controls: buttons, check boxes and so on.

    • ItemsControl objects with composite items - Holds a list of objects that contain composite items whose internal elements TestComplete should expose. These can be, for example, list box or combo box controls with composite items.

      Note: The objects listed in this table must be descendants of the ItemsControl class.

    Both tables contains three columns:

    Column Description
    Active Specifies whether TestComplete should expose internal controls of the object that corresponds to the given row.
    Class name Specifies the class name of the desired object.
    You can leave this column empty, if you specify a value in the Name column.
    Name Specifies the name of the desired object as it is defined in the application’s source code.
    You can leave this column empty, if you specify a value in the Class name column.
    To add an object to a table
    • Click the Add button to the right of the desired table. This will append a new row to the table.

    • Enter the desired object’s name or class name into the Class name or Name cell.

      Note: You can use the class name or name to specify the desired object.
      Wildcards (? and *) are not supported.
    • Press Enter to confirm the change.

    • Click the Active check box for the object.

    To modify data in a table

    To modify data in a cell, click the cell twice (not double-click) or press F2.

    To confirm the change, press Enter. To cancel the change, press Esc.

    To remove an object from a table
    • Select the row that corresponds to the desired object.

    • Press Remove to the right of the table.

    To temporarily disable access to internal controls of an object
    • Select the row that corresponds to the desired object.

    • Clear the Active check box.

The default values of the WPF settings that will be used in new TestComplete projects are specified in the Default Project Properties - WPF Options dialog.

See Also

Support for WPF Control Templates
Addressing Objects in WPF Applications
Default Project Properties - WPF Options
Project Properties

Highlight search results