Test and debug your property retrieval function

This task describes how to instruct Extensibility Accelerator to retrieve a property value from a control in your application. This enables you to test and debug the JavaScript implementation function that you designed to retrieve property values.

Note: This task is part of a higher-level task. For details, see Design test object class identification properties.

Prerequisites

  1. If you are running on Microsoft Internet Explorer, enable script debugging in Microsoft Internet Explorer.

    For example: In Internet Explorer 7.0, select Tools > Internet Options. In the Advanced tab, clear the Disable Script Debugging options in the Browsing group.

    Extensibility Accelerator 2022 or later:  If you are running on Google Chrome, press F12 to open DevTools and use it to debug your functions.

  2. Open the application from which you want to retrieve property values, and make sure that the page is fully loaded and the relevant control is visible. (You must run Extensibility Accelerator and open a project before you open the Web browser.)

  3. Make sure that the rules displayed in the rule editor for your test object class correctly identify the control whose property you want to retrieve.

    You can click Test All Rules in the Map to Controls tab (Test Object Class designer) and verify that the control is highlighted in the application.

Back to top

Set a breakpoint in your implementation function - Optional

If you want the run session to pause when it reaches the function that you designed to retrieve property values, you can add a breakpoint to the function.

If you are running on Microsoft Internet Explorer, use the Microsoft Visual Studio JavaScript debugging tools available in Extensibility Accelerator to add the breakpoint.

If you are using Google Chrome, use the DevTools capabilities.

Back to top

In the Debug Property Retrieval dialog box, select a property to retrieve

Do one of the following:

  • In the Properties tab (Test Object Class designer), select an identification property from the property list and click the Debug Property Retrieval button in the property list toolbar.

    The Debug Property Retrieval dialog box opens with the test object class and the property selected.

  • Select Project > Debug Property Retrieval.

    In the Debug Property Retrieval dialog box that opens, select the test object class and the property that you want to retrieve. Select only properties for which you designed support in your JavaScript function.

Back to top

Select the application control whose property value you want to retrieve

  1. In the Debug Property Retrieval dialog box, click Select Control. Extensibility Accelerator is hidden, all of the controls that match the mapping rules in all open Web applications, are highlighted, and a Cancel button is displayed at the top of the screen.

    In many cases you can open or navigate to additional applications or Web pages at this point. Once the application or page loads successfully, the matching controls are highlighted in it as well. (To navigate at this point, you need to hold down the Ctrl key.)

    If a specific page does not load properly when navigating to it at this point, load that page in an additional browser before clicking Select Control.

    Note: Controls are highlighted only in browsers that are opened after you open a project in Extensibility Accelerator.

  2. Click the control whose property value you want to retrieve. You must select one of the highlighted controls.

    The highlighting is removed from the application, Extensibility Accelerator opens and the Debug Property Retrieval dialog box is displayed.

Back to top

Retrieve the property value

In the Debug Property Retrieval dialog box, click Retrieve Value. Extensibility Accelerator attempts to retrieve the property value from the control you selected, by calling the JavaScript function that you implemented to retrieve property values, passing the selected property name as a parameter. (The property name is passed in lowercase letters, simulating UFT One's property value retrieval behavior.)

If you retrieve the property value from a control running in Microsoft Internet Explorer, you can now debug your functions using the Microsoft Visual Studio Shell debugging tools that are available in Extensibility Accelerator.

If you retrieve the property value from a control running in Google Chrome, use the DevTools capabilities to debug it.

Back to top