Highlighted
Absent Member.. bobando Absent Member..
Absent Member..
205 views

QTP/UFT Support Tip: Web events are not triggered in web objects

Hello everyone,

 

Sometimes QTP/UFT will not be able to fully interact with web objects, even if those objects seem to be correctly recognized. Such failure could include a .Click not being performed on an object, QTP/UFT not enabling or disabling a checkbox, not entering text into a textbox, etc. But it seems the tool will continue running the script without reporting any errors, as if the step was performed successfully. These scenarios can be caused by events not being triggered correctly. What can be done to workaround this issue?

 

In QTP, you can change the "replay type" to act as a manual interaction instead or events. This can be done either by code (to change it for specific sections only) or by changing the setting in the QTP options for the entire script.

 

To change the replay type to "mouse" for the entire script:

 

1. From the Tools menu, select Options... 

2. Select the Web tab. 

3. Click Advanced

4. Under "Replay type" in the Run settings, select "Mouse". 

5. Click OK.

 

To change the replay type programmatically for an specific section of the script use the following code:

 

Setting.webpackage("ReplayType") = 2 'change the replay type to Mouse 

 

' add your code here, it will run un "mouse" replay mode

 

Setting.webpackage("ReplayType") = 1 'change the replay type back to Event 

 

 

I hope the above information helps.

 

Thanks,

Braulio

HP | Unified Functional Testing Engineer

[If this post or any other post helps to resolve your issue or query, mark the thread as solved and give KUDOS to the author for their assistance. ]

(Posts and opinions made here are my own and do not reflect the opinions of my employer HP in any way)
Labels (2)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.