Saturday, June 4, 2011

General Run Error on using Browser.Back

I got a question from one of my esteemed reader which I am posting below:

I am trying to use 'Browser("Browser").Back' but I always General Run Error. I am using QTP 9.5 and IE7. I have tried uninstalling/reinstalling QTP but the issue is still not fixed. It also seems to fail when I try Browser methods (I have also tried Browser("Browser").Refresh and it came up with the same error).

Possible Solution:

1. In IE settings, go to Tools -> Manage Add-ons
2. Select the BHOManager Class
3. Click the Enable button

If the above solution doesnt work, you can also try the below code:

Set oWshShell = CreateObject("WScript.Shell")
oWshShell .SendKeys "{BS}"