WPF/Silverlight Custom Support Setup Dialog Box (in Microsoft Visual Studio)

This dialog box opens when you select the UFT One WPF Custom Support template to create a UFT One Extensibility project in Microsoft Visual Studio.

UFT One 2022 and later: Following the discontinuance of the Silverlight development framework, UFT One no longer supports the Silverlight Add-in out of the box.

If you need to use and extend the Silverlight Add-in, contact OpenText Support.

The Custom Support Setup dialog box enables you to provide specifications that describe the support that you want to create. When the extensibility project is created in Visual Studio, its files are created with the basic content, infrastructure, and references required to create the support you described.

The template sets up both the XML files and the Microsoft Visual Studio solution that you need to create the custom server DLL. When you create support for more than one control in a toolkit, you have to combine the XML content created for each control into one toolkit configuration file and one test object configuration file for the toolkit.

To access
  1. In Microsoft Visual Studio, select File > New> Project.

  2. Enter UFT in the search box and select the UFT WPF Custom Support template.

  3. Provide a name and location for your new project, and a name for the solution (or accept the default values provided).

  4. Click OK. The WPF Custom Support Setup dialog box opens.

Relevant tasks

How to Create Support for a Custom Toolkit

Important information

Once you enter the Custom control type, all other field values are generated automatically.

You can accept the default values, or clear the relevant "Auto generate..." check box and define your own.

If you do not change the default values, any modifications you make to the Custom control type in this dialog box, modify the other fields as well.

See also

User interface elements are described below:

UI Elements

Description

Target

Specify whether your custom support needs to target the .NET Framework or .NET.

This depends on whether the application you want to test uses a version of .NET or .NET Framework.

Note: .NET is supported only on Visual Studio 16.8 or later.

For information on the .NET/.NET Framework versions supported by UFT One WPF Add-in Extensibility, see the UFT One support matrix.

Custom control type

The name of the custom control type for which you want to develop support.

This can be one of the following:

  • A full type name, including namespaces. For example: Infragistics.Controls.Editors.XamComboEditor

  • A full type name and an assembly name. For example: Infragistics.Controls.Editors.XamComboEditor, InfragisticsWPF4.Controls.Editors.XamComboEditor.v12.1

  • An assembly qualified name. For example: Infragistics.Controls.Editors.XamComboEditor, InfragisticsWPF4.Controls.Editors.XamComboEditor.v12.1, Version=12.1.20121.1010, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb

Note: In most cases, the full type name is sufficient. You can use the more complex name when the same control is included in more than one assembly, for example, when your application includes different versions of the same control.

Base class name

The test object class that your new test object class extends.

Select from the list of built in UFT One test object classes, or enter a name of a test object class that you defined in a WPF Add-in Extensibility test object configuration file.

Default: WpfObject

Support class name

The name of the support class to create in the new project.

Note: This class is also referred to as the custom server class.

Customize running operations

Indicates that you want to design or override implementation for running test object operations on the control.

If you select this option, the Run interface that you specify is defined and tagged with the RunInterfaceAttribute. In the custom server class, the interface is implemented with a method stub for an example test object operation. The example test object operation is also added to the project's test object configuration file.

Run interface name

The name of the interface in which you want to implement support for the test object operations.

Available only when Customize running operations is selected.

Customize property retrieval

Indicates that you want to design or override implementation for retrieving identification property values from the control.

If you select this option, the Property interface that you specify is defined and tagged with the CustomPropInterfaceAttribute. In the custom server class, the interface is implemented with a method stub for an example identification property. The example identification property is also added to the project's test object configuration file.

Property interface name

The name of the interface in which you want to implement support for property value retrieval.

Available only when Customize property retrieval is selected.

Toolkit name

A name for the environment, or set of controls, that you want to support with this toolkit support set.

After you deploy your support, UFT One displays this name in the Add-in Manager as a child node under the WPF add-in node, enabling the user to specify whether to load support for this environment.

In the new project created, the toolkit name is used to create the configuration file names, and entered in the PackageName attribute of the TypeInformation element in the test object configuration file. It is also used for the root namespace of the project.

Mapped test object class

The test object class that you want UFT One to use to represent the custom control.

In the new project created, a basic definition for this new test object class is created in the test object configuration file.

Customize recording

Indicates that you want to design support for recording test object operations on the control.

If you select this option, the custom server class is defined to implement the IRecord interface and includes method stubs for the interface's methods.

Design support for table checkpoints

Indicates that you want the standard checkpoints and output values that UFT One creates on your test object to be table checkpoints and output values.

If you select this option, a preliminary implementation of the ItableVerify interface is created in the custom server class. Implement this interface according to your needs.

Customize child object handling

Indicates that you want UFT One to treat some of the custom control's child objects as an integral part of the control and not as independent objects.

If you select this option, a preliminary implementation of the IsKnownPartOf method in the IComponentDetector interface is created in the custom server class. Implement the method to return true for the relevant child objects.

Generate comments and sample codeIndicates that you want the created files to include additional comments and code samples, helpful for beginner users.
Use .NET SDK Project Style

Indicates that you want the generated code to use the new, simplified, .NET SDK project style. For details on the .NET SDK style, see the Microsoft documentation.

Permanently selected for .NET projects.

Optional for .NET Framework projects. Selected by default. (Recommended)

Note: This option is supported only on Visual Studio 16.8 or later.

The Custom Server Setup dialog box enables you to provide specifications that describe the support that you want to create. When the extensibility project is created in Visual Studio, its files are created with the basic content, infrastructure, and references required to create the support you described.

To access
  1. In Microsoft Visual Studio, select File > New> Project.

  2. Enter UFT in the search box and select the UFT WPF CustomServer or UFT Silverlight CustomServer template.

  3. Provide a name and location for your new project, and a name for the solution (or accept the default values provided).

  4. Click OK. The WPF or Silverlight Custom Server Setup dialog box opens, depending on the template you selected.

    The project name is also used as the default value for some of the fields in the dialog box.

Important information

To successfully create a project using the UFT One Silverlight CustomServer template, you must have the Microsoft Silverlight Tools for Visual Studio installed.

Relevant tasks

How to Create Support for a Custom Toolkit

See also

User interface elements are described below:

UI Elements

Description

Custom server class name

The name of the custom server class to create in the new project.

Note: By default, this name is used to create the default values for Run interface name, Property interface name, and Mapped test object class. If you have not changed these values, modifying the Custom server class name modifies them as well.

Customize running operations

Indicates that you want to design or override implementation for running test object operations on the control.

If you select this option, the Run interface that you specify is defined and tagged with the RunInterfaceAttribute. In the custom server class, the interface is implemented with a method stub for an example test object operation. The example test object operation is also added to the project's test object configuration file.

Run interface name

The name of the interface in which you want to implement support for the test object operations.

Available only when Customize running operations is selected.

Customize recording

Indicates that you want to design support for recording test object operations on the control.

If you select this option, the custom server class is defined to implement the IRecord interface and includes method stubs for the interface's methods.

Note: The links in this section link to the Mercury.QTP.WPF.CustomServer namespace section in the Custom Support API Reference. For the most part, the information there is relevant for Silverlight as well, and is identical to the information provided in the Mercury.QTP.Slv.CustomServer namespace section.

The IRecord interface is different in the two namespaces. See this link for information on the IRecord interface in the Mercury.QTP.Slv.CustomServer namespace.

Customize property retrieval

Indicates that you want to design or override implementation for retrieving identification property values from the control.

If you select this option, the Property interface that you specify is defined and tagged with the CustomPropInterfaceAttribute. In the custom server class, the interface is implemented with a method stub for an example identification property. The example identification property is also added to the project's test object configuration file.

Property interface name

The name of the interface in which you want to implement support for property value retrieval.

Available only when Customize property retrieval is selected.

Customize child object handling

Indicates that you want UFT One to treat some of the custom control's child objects as an integral part of the control and not as independent objects.

If you select this option, a preliminary implementation of the IsKnownPartOf method in the IComponentDetector interface is created in the custom server class. Implement the method to return true for the relevant child objects.

Design support for table checkpoints

Indicates that you want the standard checkpoints and output values that UFT One creates on your test object to be table checkpoints and output values.

If you select this option, a preliminary implementation of the ItableVerify interface is created in the custom server class. Implement this interface according to your needs.

Toolkit name

A name for the environment, or set of controls, that you want to support with this toolkit support set.

You may want the name to indicate whether this is a WPF or Silverlight toolkit. After you deploy your support, UFT One displays this name in the Add-in Manager as a child node under the WPF add-in node, enabling the user to specify whether to load support for this environment.

In the new project created, the toolkit name is used to create the configuration file names, and entered in the PackageName attribute of the TypeInformation element in the test object configuration file (if you select Auto generate the XML configuration files). It is also used for the root namespace of the project.

Auto generate the XML configuration files

Indicates that in the new project created, a toolkit configuration file and test object configuration file should also be created. The files are created with basic definitions, according to the details you specify in this dialog box.

In a toolkit support set, the definitions for all of the controls that you want to support are included in one toolkit configuration file, and one test object configuration file. On the other hand, you design a separate custom server for each control you support. Therefore, if you use the template to create additional custom servers, you might not want to generate additional XML files. Alternatively, you can decide to generate the XML configuration files as well, and then copy the information from these new files to your main configuration files.

Custom control type

The name of the custom control type for which you want to develop support.

For Silverlight: A full type name, including namespaces.

For WPF: This can be one of the following:

  • A full type name, including namespaces. For example: Infragistics.Controls.Editors.XamComboEditor

  • A full type name and an assembly name. For example: Infragistics.Controls.Editors.XamComboEditor, InfragisticsWPF4.Controls.Editors.XamComboEditor.v12.1

  • An assembly qualified name. For example: Infragistics.Controls.Editors.XamComboEditor, InfragisticsWPF4.Controls.Editors.XamComboEditor.v12.1, Version=12.1.20121.1010, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb

Note: In most cases, the full type name is sufficient. You can use the more complex name when the same control is included in more than one assembly, for example, when your application includes different versions of the same control.

Mapped test object class

The test object class that you want UFT One to use to represent the custom control.

In the new project created, a basic definition for this new test object class is created in the test object configuration file (if you select Auto generate the XML configuration files).

Base class name

The test object class that your new test object class extends.

Select from the list of built in UFT One test object classes, or enter a name of a test object class that you defined in a WPF or Silverlight Add-in Extensibility test object configuration file. (WPF test object classes need to extend other WPF test object classes, and Silverlight test object classes need to extend other Silverlight test object classes.)

Default: WpfObject or SlvObject