How to Use Fire Event in LeanFT | UFT Developer

FireEvent operation is used in LeanFT now known as UFT Developer to perform events like mouseover, Keypress, and Keyup, etc on Web element using EventInfoFactory class in LeanFT (UFT Developer).

The following example illustrates how to use a fire event in LeanFT. The below code will navigate to Amazom.com.After that it will do a mouse over on the link “Hello, Sign in“.

fire-event-leanft
On doing a mouseover, a mega menu is displayed.

Fire Event in LeanFT
After performing the mouse over the script will find the “Your Account” link and will perform a click action on it.

Example-Fire Event in LeanFT | UFT Developer

You can find the following commonly used Events.

Event Name Description
click  The event occurs when the user clicks on an element
dblclick The event occurs when the user double-clicks on an element
Keydown The event occurs when the user is pressing a key
Keypress The event occurs when the user presses a key
Keyup The event occurs when the user releases a key
Mouseenter The event occurs when the pointer is moved onto an element
Mouseleave The event occurs when the pointer is moved out of an element
Mousemove The event occurs when the pointer is moving while it is over an element
Mouseover The event occurs when the pointer is moved onto an element, or onto one of its children
Mouseout The event occurs when a user moves the mouse pointer out of an element, or out of one of its children

Recommended Posts

Leave a Reply