5 minute read time

A Complete Guide to the UFT One Extensibility Accelerator

by Micro Focus Employee in Application Delivery Management

Challenge - An unrecognized Web table

Have you ever encountered a situation where UFT One cannot support the web application (AUT) you need to test? For example, see Fig.1 the web table in the following webpage (https://webix.com/widget/datatable/): a common method such as getcelldata fails (see Fig.2 &Fig.3). We can try to use a checkpoint to look at this web table again, but it doesn’t show any data (see Fig.4).

Although we can also use web element or insight record or device replay to operate this web table, we would prefer to get the total directly through the title in the table or fill in the number according to the year. (See Fig.5)

  
Fig.1


Fig.2


Fig.3


Fig.4


Fig.5 

UFT One Web 2.0 Add-ins

link: Web2Toolkits    

UFT One Web Extensibility enables users to create their own toolkit support sets. These can be used as custom web add-ins and provide customized support for unsupported web controls.

The Web 2.0 add-ins included in UFT One, such as SAPGUI5 or AgGrid are built using Web Extensibility. Extensibility-based add-ins can be used in multiple browsers such as Firefox, Chrome, and Edge.

Fig.6


Fig.7

Extensibility Accelerator Preparations

Extensibility Accelerator (EA) is a tool to help users create their own custom web add-in.

As of UFT One 2022, the Chrome browser is supported.

  1. Install the EA tool
  2. Check if chrome is using the correct EA test extension, extension path (C:\Program Files (x86)\Micro Focus\Extensibility Accelerator\dat\Chrome\v2\Extension)
  3. Both UFT One and EA have their own Chrome extensions, so if you have both UFT One and EA installed on your computer, you need to change the registry value when switching the Chrome extension
    1. If you want to use UFT One's Chrome extension, this registry should be the value of the following picture
    2. If you want to use EA's Chrome extension, this registry should be the value of the picture below
        

Note: The EA extension will be updated in a future version of UFT One to be clearly different from the UFT extension 

Create a project

  1. File->New->Project->Web Add-in Extensibility->OK
  2. add Test Object Class
  3. edit basic information of the test object
    1. black arrow – the icon shown in UFT SPY dialog
    2. green arrow – help file will be shown when you hover on the test object
  4. open the web page that contains the test object
  5. select the test object in Page


5.1 Default Rules – explanation: https://admhelp.microfocus.com/uft/en/all/Extensibility/Web_Ext/Content/WebExtensibility/WebExtDev_IDXML.htm

  1. You will get some attributes that will be used to match elements in the page
  2. These properties can be edited. After modification you can try to use 'test rules', where all matching elements in the page will be highlighted




  3. add properties - selected properties will be shown in UFT One’s Spy dialog/Checkpoints/…

8.1 example – add html id / html tag / name into the Spy dialog, navigate to JavaScript (black arrow)

8.2 JavaScript

8.3 return value will be sent to the Spy dialog

8.4 The Spy Dialog
  

  1. add user-defined method

Black – add a new method

Red – method name

Blue – JavaScript which you can program the method directly

Green – the return value of this method

Yellow – arguments you needed in this method, you can define their types





  1. deploy
    1. Deploy to UFT One – If you have both UFT One and EA installed on your machine, this option will help you install the current project directly to the target directory, reopen UFT One to see this new custom web add-in (%UFT One installer path%\dat\Extensibility\Web)
    2. Deploy to Zip File - This option creates a zip file that you can extract and place on a machine with UFT One installed (%UFT One installer path%\dat\Extensibility\Web)
        

Possible Issues

  1. All properties in the spy dialog box test object are empty
    1. Check the xxxx_TestObject.xml file, Comparing it to other native _TestObject.xml files in UFT, some attributes may be unwanted or missing, for example “xsi:noNamespaceSchemaLocation”
  1. Replay error
    1. Copy the JavaScript method into the Devtool in browser(F12) then execute it. The same method may work fine in Chrome, but it may be problematic in edge/Firefox, which has to do with the deployment of the site in different browsers
  1. Base web-element disappears
    1. The priority of custom test objects higher than other web test objects. If a control can be identified as a web object, or as an object that belongs to a cusotm add-in created with web extensibility, the custom object is used
    2. Example: When only Web add-in is selected, the target element in the picture on the left is recognized as a webbutton, and in the picture on the right, the target element is recognized as a SAPUIButton after the SAPUI5 add-in is checked

            

                   

  1. Do I need EA to modify my custom support?
    1. The EA is just a bootstrapping tool that makes it easier for you to create custom support. you can make changes directly to the xml file and the associated javascript file, and all the options/configurations provided in the EA can be changed directly in the xml/javascript file
    2. For example:  The %Projectname%.xml records the properties required to match the corresponding test object 

Learn More

Check out What’s New in UFT One 2022 to see the complete list of features and technologies, or browse the full Product Availability Matrix from our Online Help Center.

UFT One 2022 is part of the UFT Family, which also includes UFT Developer and UFT Mobile. Read the UFT Developer 2022 announcement and  What's New in UFT Mobile to find out what’s new in the rest of the UFT Family.

Get started

Download Extensibility Accelerator today from the following Link:

Download UFT One 2022 today from the following locations:

Downloads are available in English, French, German, Japanese, and Simplified Chinese.

Visit us at:  microfocus.com | Twitter | LinkedIn

Tags:

Labels:

Functional Testing