Developing Browser-Independent Support

Many Web controls are implemented differently and operate differently on different browsers, because of the way different DOM properties are implemented on the different browsers.

To enable your custom support to work for Microsoft Internet Explorer, Google Chrome, and Mozilla Firefox, you must address the following:

  • If the control's DOM structure is different in different browsers, UFT One may need to use different logic to identify which test object class to use for the control when learning objects or running steps on different browsers. For information on how to define browser-specific identification conditions, see Using the Conditions Elements.

  • When you write your JavaScript functions, use jQuery function calls to create code that can run smoothly on different types and versions of browsers. For more information see Create browser-independent support in the section on Designing JavaScript functions for your toolkit support set.

  • Web Add-in Extensibility provides the GetBrowserType and GetBrowserVersion utility methods, which you can use to determine the type and version of the browser that is currently running a control. This enables your JavaScript code to treat a control differently, depending on the browser that is currently running the control.