QTP/UFT Support Tip: Web events are not triggered in web objects
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.
[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)