Browser operations (Back, Forward, Home, Refresh, Navigate, Object, etc.) return “General Run Error” or are not executed

QuickTest Professional records scripts with methods such as HOME, BACK, FORWARD, REFRESH, .Object and during play back, any of the methods from the Browser object return “General Run Error”. Another situation may be that Browser.Navigate statements isn’t getting recorded and if manually coded, such get skipped or not executed.

Example script showing issues:

Browser("Browser").Page("Page").WebEdit("q").Set "hello"

Browser("Browser").Page("Page").WebEdit("q").Submit

Browser("Browser").Page("Page").Sync

Browser("Browser").Back ‘ —> Error "General Run Error"

Browser("Browser").Page("Page").Sync

Browser("Browser").Forward ‘ —> Error "General Run Error"

Browser("Browser").Page("Page").Sync

Browser("Browser").Navigate "www.yahoo.com" ‘ —> Skipped or Ignored

Browser("Browser").Page("Page").Sync

Browser("Browser").Refresh ‘ —> Error "General Run Error"

Print Browser("Browser").Object.HWND ‘ —> Error "General Run Error"

Browser("Browser").CloseAllTabs

The Browser Helper Object Internet Explorer (IE) Add-on "BHOManager Class" from HP/Former Mercury Interactive for QuickTest Professional (QTP), reference of BHOManager.dll under %windir%system32, takes care of BROWSER test object methods such as BACK, FORWARD, HOME, REFRESH, NAVIGATE, .OBJECT (among others) when is enable.

If the mentioned Class/DLL functionality gets blocked/disabled/not-loaded on browser by either of following situations, errors or unexpected behavior may occur while running scripts:

Internet Explorer required setting "Enable third-party party browser extensions" is disabled

%windir%\System32\BHOManager.dll file doesn’t exist

%windir%\System32\BHOManager.dll file wasn’t registered properly during installation process

%windir%\System32\BHOManager.dll file is corrupted

Other currently active Internet Explorer Add-ons of Browser Helper Object type conflict with QTP Add-on

BHO registry keys settings aside from one from QTP are conflicting between each other (under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects)

Old registry keys settings from previous versions of QTP (under HKEY_CURRENT_USER\Software\Mercury Interactive\Browser Helper Objects\AgentsKeys)

Note: Paths including "%" (percentage) symbol, usually invoke a operating system environmental variable. To know the actual path either of following can be done:

On "Start" menu, go to "Run", type the provided path with the % symbol (i.e. %temp%), and press "Enter" key or click "Ok" button

Check the operating system’s environmental variables, and search for one enclosed between the % symbols (i.e. "%temp%", then find "temp") among ones being listed for such Windows. For more information see http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/environment_variables.mspx?mfr=true

Among the detected examples of other public add-ons of Browser Helper Object type conflicting with QTP’s Browser Helper Object Add-on, McAfee "SiteAdvisor" Internet Explorer Add-on appears to disables the BHO from "Mercury Interactive" (QTP Web Internet Explorer Add-on).

McAfee included has 2 different items as Add-ons on IE: 1) "SiteAdvisor" (Browser Helper Object) and 2) "McAfee SiteAdvisor" (Toolbar). For more information about McAfee SiteAdvisor http://en.wikipedia.org/wiki/SiteAdvisor

Internet Explorer required settings are disabled

The setting "’Enable third-party party browser extensions" doesn’t control if BHOManager or other Internet Explorer Add-ons are listed or not under IE > Manage Add-ons, it actually affects its functionality (if this setting is "cleared/unchecked/disabled", then BHOManager won’t work).

Ensure:

Open Internet Explorer

Go to Tools > Internet Options > Advanced

Under ‘Browsing’ category check the option ‘Enable third-party party browser extensions’

Click ‘Apply’ and ‘OK’

NOTE: Above steps can be done/checked via registry:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

"Enable Browser Extensions"="yes"

Restart Internet Explorer in order for the changes to take effect (no need to restart QTP)

Currently active Internet Explorer Add-ons of Browser Helper Object type conflicting with QTP "BHOManager Class" IE Add-on

Disable all Internet Explorer (IE) Add-ons except for "BHOManager Class" from "Mercury Interactive Corporation", and start testing one by one the add-ons your IE instance has installed on it. For more information about troubleshooting IE, see http://support.microsoft.com/kb/883256

BHOManager Class Add-on is missing

The Antivirus program that is running might be preventing the BHOManager.dll from being installed. Temporarily stop the service, register the BHOManager dll and restart the service.

BHOManager.dll file doesn’t exist

Verify that the under the path %windir%\system32 the file "BHOManager.dll" exist with the mentioned name. If it doesn’t then running the Repair option of the product may restore it existence on mentioned path. If such option doesn’t sets a copy of the file on such path, then contact your system administrator for any permissions limitations the user profile using the option may have. Testing another user with full administrator privileges may be of use to know about permission issues.

BHOManager.dll file wasn’t registered properly during installation process

Check that under the IE list of Add-ons (be sure to select to show all, not just currently loaded), the BHOManager Class from "Mercury Interactive Corporation" is shown, otherwise the mentioned methods may present issues/errors when replayed. If such isn’t listed, then try registering the BHOManager.dll file:

Close all browser windows and QTP

Open a command prompt (On the "Start" menu, select "Run", then type "cmd" followed by clicking the "Ok" button)

Run command: "regsvr32 %windir%\System32\BHOManager.dll"

Wait for confirmation indicating that such command ran successfully

Old registry keys settings from previous versions of QTP

When migrating between QTP versions, old references to paths that don’t exist may overwrite existing paths, not fully loading the BHOManager Class functionality:

Close all browser windows and QTP

Access Windows Registry Editor (On the "Start" menu, select "Run", then type "regedit" followed by clicking the "Ok" button)

Navigate to key:

HKEY_CURRENT_USER\Software\Mercury Interactive\Browser Helper Objects\AgentsKeys

Backup key mentioned on step 3 (select key, right click to select "Export" and save REG file with key’s information).

NOTE: Hewlett-Packard recommends consulting your System/IT administrator for any registry configurations

Delete entry: {95D11A40-0F78-45A1-AADA-E89DBBF6C5B7}

Note: if WinRunner is installed on same machine key {B7DB7E5A-81FD-11D1-8B75-0080C83788F7} will be present

Other BHO registry keys settings conflicting in the background are conflicting between each other

In occasions settings from old QTP BHOManager instances or from other Browser Helper Object Add-ons may cause issues due to old references:

Close all browser windows and QTP

Access Windows Registry Editor (On the "Start" menu, select "Run", then type "regedit" followed by clicking the "Ok" button)

Navigate to key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects

Backup key mentioned on step 3 (select key, right click to select "Export" and save REG file with key’s information). Note: HP recommends consulting your System/IT administrator for any registry configurations

Rename (or delete) registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects

Reboot machine (not simple log-off, actual restart of entire machine)

BHOManager.dll file is corrupted

If all the above has failed to resolve issue, the related file and possibly others which such depends on (from QTP end), may be corrupted to which HP suggest proceeding with a clean re-installation of the product, however specific

Advertisements

One thought on “Browser operations (Back, Forward, Home, Refresh, Navigate, Object, etc.) return “General Run Error” or are not executed

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s