I've been reading for a while now about the hwnd property and the theory is pretty straight forward, but when I try to apply it to a basic scenario, it does not work, so maybe someone can point me in the right direction?
- I'm working with QTP 9.5 and IE7.
- I've disabled the multi-tab functionality in IE7
- Browser("title:=about:blank").GetROProperty("hwnd" ) does not work
sHWND = Browser("title:=about:blank").Object.HWND works
- If we use this .Object.HWND with the Windows object for things such as maximize, it works as well.
- However, what I need is just to use that HWND with the Browser object and navigate to another URL.
- I've tried
Browser("title:=about:blank").SetTOProperty("hwnd" ) = sHWND
and this did not work, apparently Browser("hwnd:=" &sHWND) does not exist!!!
I've seen several posts talking about this property but no-one is mentioning these problems, so not sure if I'm missing something here or if there's some kind of incompatibility I'm not aware of yet.
Here is what they provided:
1. Renamed the BHO from registry.
a. Close QuickTest Professional and Internet Explorer.
b. Open the Registry editor (Start -> Run -> type "regedit" and click <OK>.
c. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer
d. Rename to Browser Helper Objects to Browser Helper Objects.bak.
2. Registered BHOManager.dll and WIAgentIE.dll files. by regsrv32
3. Loaded only web add-in.
4. Tools -> Options -> Web -> Advanced -> Record Settings -> Record standard mouse events.
5. In object identification, removed the title property, so that the browser is recognised by Creation Time.
When we follow these steps, it fixes it at our end.