QTP/UFT – Using the FireEvent method when clicking does not work

Hi. This tutorial will be simple and to the point. When regular object click isn't working in QTP/UFT, try the fireevent method. The syntax is simple:

Instead of

Browser("Property name:=Property Value").Page("Property name:=Property Value").Link("Prop"Property name:=Property Value").Click

Use:

Browser("Property name:=Property Value").Page("Property name:=Property Value").Link("Prop"Property name:=Property Value").FireEvent("onclick")

Example:

I created a test link below:

Test Link

Click on this test link using the following code: Make sure to close all other browsers and windows

Browser("Index:=0").Page("title:=.*").Link("name:=Test Link").FireEvent("onclick")

It's as simple as that. Post your questions and comments below!

Pin It on Pinterest

Clef two-factor authentication