Thursday, March 15, 2012
Pure virtual function call
Suddenly QTP behaves very strangely. You cannot save any Tests etc etc... and it throws an error message saying R6025 - Pure Virtual Function call. You cannot do much after this error.
Reinstalling QTP also less useful.
Possible causes might be:
QTP configuration files might be corrupt.
Not properly handling pointers in QTP, meaning not properly releasing the objects like Excel, ObjectRepository objects etc...
QTP provides patch for this. Install the patch QTP_00604 or QTP_00626.
IE scripts are failing or Objects are not recognized in IE.
Scripts are failing when IE is upgraded.
User has scripts developed in IE 6 and they worked fine.
But user updated his IE to IE7, then the scripts which worked earlier are failing now in IE 7.
Reasons could be:
BHOManager add-in could be disabled in IE7.
This add-in is needed for QTP to interact with IE.
Enable this Add-in by:
Open IE -> Tools Menu -> Manage Add-ons -> Enable or Disable add-ons -> Select BHOManager Class
Check whether the add-on is enabled or not. It should be enabled.
Objects are properly recognized in IE 7, but not recognized in IE 8.
Reason could be: Protected mode in IE 8.
Check the above solution, then follow to disable the protected mode in IE.
Open IE -> Tools Menu -> Internet Options -> Security Tab -> Uncheck "Enable Protected Mode" check box.
User has scripts developed in IE 6 and they worked fine.
But user updated his IE to IE7, then the scripts which worked earlier are failing now in IE 7.
Reasons could be:
BHOManager add-in could be disabled in IE7.
This add-in is needed for QTP to interact with IE.
Enable this Add-in by:
Open IE -> Tools Menu -> Manage Add-ons -> Enable or Disable add-ons -> Select BHOManager Class
Check whether the add-on is enabled or not. It should be enabled.
Objects are properly recognized in IE 7, but not recognized in IE 8.
Reason could be: Protected mode in IE 8.
Check the above solution, then follow to disable the protected mode in IE.
Open IE -> Tools Menu -> Internet Options -> Security Tab -> Uncheck "Enable Protected Mode" check box.
Wednesday, March 14, 2012
All menu options are missing in QTP
Sometime you are strange to see that all menu options are missing in QTP.
Ex: File -> Setting etc... You may miss lot of menu options in QTP.
Fix:
Open QTP -> Tools menu -> Customize -> Click on Toolbars Tab -> Restore All ->click on Close button.
If you miss options in Tools Menu, then in QTP right click on the tool bar and choose customize.
Ex: File -> Setting etc... You may miss lot of menu options in QTP.
Fix:
Open QTP -> Tools menu -> Customize -> Click on Toolbars Tab -> Restore All ->click on Close button.
If you miss options in Tools Menu, then in QTP right click on the tool bar and choose customize.
Sunday, March 11, 2012
How to get the source code of a Webpage using QTP
print browser("name:=AAA").page("title:=AAA").Object.documentElement.innerHTML
Subscribe to:
Posts (Atom)