Event listening and recording

For each event, you can instruct UFT One to:

  • listen every time the event occurs on the object.

  • listen only if an event handler is attached to the event.

  • listen only if a DHTML behavior is attached to the event.

  • listen if either an event handler or DHTML behavior are attached to the event.

  • never listen to the event.

An event handler is code in a Web page, typically a function or routine written in a scripting language, that receives control when the corresponding event occurs.

Note: UFT One supports event handlers that are attached using an on* attribute (such as onclick or onmouseover). It does not support other event handlers, such as those attached using an addEventListener or attachEvent command.

A DHTML behavior encapsulates specific functionality or behavior on a page. When applied to a standard HTML element on a page, a behavior enhances that element's default behavior.

For each event, enable recording, disable recording, or enable recording only if the next event is dependent on the selected event.

For example, suppose a mouseover behavior modifies an image link. You may not want to record the mouseover event each time you happen to move the pointer over this image. It is essential, though, that the mouseover event be recorded before a click event on the same object because only the image that is displayed after the mouseover event enables the link event. This option applies only to the Image and WebArea objects.

If settings for different objects in the Objects pane conflict, UFT One gives first priority to settings for specific HTML Tag Objects and second priority to Web Objects settings. UFT One applies the settings for Any Web Object only to Web objects that do not belong to any other loaded Web-based environment and were not defined in the HTML Tag Object or Web Objects areas.

For task details, see Manage listening and recording events and Configure UFT One to record mouse clicks