Open topic with navigation
The UFT Web Add-in does not recognize these complex controls and, instead, relates to the HTML elements that comprise them. This results in low-level steps on generic Web test objects. Such steps may be difficult to create, read, and maintain.
UFT Web Add-in Extensibility makes it possible to develop Web-based add-ins that can identify the controls in a Web 2.0 application in a way that better matches the intended purpose and functionality of those controls.
UFT provides built-in Web Add-in Extensibility support for several public Web 2.0 toolkits. The support for each toolkit is packaged as a child add-in of the Web Add-in. If you install the Web 2.0 Toolkit Support, you can load this support by selecting the relevant toolkit name in the Add-in Manager. The Web 2.0 Toolkit Support Setup is available from the Add-in Extensibility and Web 2.0 Toolkits option in the UFT setup, or on your UFT computer: <UFT installation folder>\Installations\Web2AddinSetup\Web2AddinSetup.exe.
The operations supported for each Web 2.0 test object class are a combination of custom operations developed for that test object class and operations directly inherited from the corresponding (base) Web Add-in test object class.
You work with a Web 2.0 toolkit add-in much the same way as you work with the regular Web Add-in. When the toolkit support is loaded, you can learn, record, create checkpoints, run steps, and use all standard UFT functionality on controls from these toolkits.
UFT provides support for the following toolkits:
ASP .NET Ajax - http://www.asp.net/ajax/
Dojo - http://www.dojotoolkit.org
Google Web Toolkit (GWT) - http://code.google.com/webtoolkit/
jQuery UI - http://jqueryui.com/
Yahoo User Interface (Yahoo UI) - http://developer.yahoo.com/yui/
For details on the test objects and operations supported for these toolkits, see the Web 2.0 Toolkits section of the HPE UFT Object Model Reference for GUI Testing.
For details on supported Web 2.0 toolkits and versions, see the HPE Unified Functional Testing Product Availability Matrix, available from the Support Matrix page (requires an HP passport).
The specific jQuery UI file injected for each Web 2.0 add-in is specified in the add-in's toolkit XML file, located in:
F1 Help Support. When you press F1 on a test object operation that was inherited from the Web Add-in, the Help displays information about that operation for the Web Add-in test object class from which the operation was inherited, and not for the extensibility-based test object class used in your step.
Additionally, the details in the Help file reflect the behavior of the test objects and operations in the XML files provided with UFT. If these files were customized or modified in any way, the details in the Help files supplied with UFT may no longer be accurate.
In general, when the content of the extensibility files for a Web 2.0 toolkit is modified, the Help file should also be changed as described in Customization Guidelines
Checkpoints and Output Values. Inserting checkpoints and output values on Web 2.0 objects is supported only when recording steps.
Container Objects. Some Web 2.0 objects that visually or behaviorally seem to contain other objects in a Web application are not learned as container objects in terms of the test object hierarchy. For example, this is the case for the
GWTDialogBox test objects.
description properties values. When working in Mozilla Firefox, the value of the
selected item or
selected description properties is not available in the Object Spy for some Web 2.0 test object classes. The same is true when updating property values from the application in the object repository. This is because the value is only retrievable when the browser is in focus.
Workaround: Retrieve the property value without removing focus from the browser. For example:
Example: Browser("Dijit Tree Test").Page("Dijit Tree Test").DojoTree("mytree").Select "Continents;Africa" msgbox Browser("Dijit Tree Test").Page("Dijit Tree Test").DojoTree("mytree"). GetROProperty("selected item")
Object Type Identification. In the toolkit XML file, the
<Conditions> elements in the <Identification> section for the relevant test object class define how UFT maps Web controls to that class.
In the example below, UFT identifies a control as a
GWTToggleButton test object (when the GWT Add-in is loaded) if it has a
<div> HTML tag and a
className HTML property with a value that matches the regular expression:
In some cases (for example, when
Keep in mind that the support provided in the HPE-furnished Web 2.0 add-ins is dependent on the HTML and DOM structure of the controls. If developers of a Web 2.0-based application change the values of a control's properties, then the values defined for the
If UFT is not identifying an object in your application as you expect, you can view or adjust these values in the relevant toolkit support files.
The toolkit XML files are located in:
If you modify this (or any) HPE-furnished toolkit support set file, follow the guidelines described in Customization Guidelines
If you are familiar with Web Add-in Extensibility, then you can customize or further extend the built-in Web 2.0 support to match the needs of the Web 2.0 toolkit application you are testing.
Extensibility Accelerator also comes with built-in projects for the UFT Web 2.0 add-ins. You can use these projects to help you learn the Extensibility Accelerator features or to more easily add to or modify the provided support files.
Make a copy of, or otherwise back up, the original HPE-provided files.
Change the name and description that are displayed in the Add-in Manager for the toolkit. Include the text:
"Provided by <YourOrganization>" in the Add-in Manager description (in the
Controls\Description element of the toolkit XML file).
Create your own Help file to be opened for the customized test object classes or operations. You must use a different file name than the HPE-provided Help file. (Change the file name in the
HelpInfo element of the Test Object XML file.)
Note: When installing the Web 2.0 add-ins, if a previous version of a selected add-in is installed on your computer, the setup stores the previous files in a backup folder before installing. You may need to merge any customizations you made to the previous version into the new version.
For details on how to make these changes and how to customize the support files, see the UFT Web Add-in Extensibility documentation, available in the
<UFT installation folder>\help\Extensibility folder.
For details on working with Extensibility Accelerator, see the HPE UFT Extensibility Accelerator for HPE Functional Testing User Guide.