Awesum Stuff

How to Automate Embedded Browser with QTP

I recently came across a situation where I had a Browser object embedded in an Excel File. I was able to identify it only as a WinObject so I was not able to access the contents inside the Page.

Page

Following was what I was getting in Object Spy :-

before

I came across an interesting solution to this problem :-

  1. Goto Start > QTP > Tools > Register New Browser Control
  2. Enter the Path of the exe of the Parent Application (in my case it was excel.exe)
  3. Register the exe
  4. Restart QTP

After implementing this, I was able to successfully identify the Page and all its contents :-

after

Advertisements

5 replies »

  1. I am trying to identify WPF window in word Doc unsuccessfully. I tried the steps you have mentioned above and still not able to see the WPF object. The objects are identified as WinObject, just like yours. Appreciate any help.

    • Hi Maya,

      What you have mentioned doesn’t seem to be an embedded browser. It seems that you are using some Word Add-In which is based on WPF Technology. For this issue, you need to install the patch QTPNET_00113, perform a record and you should be able to identify the WPF objects.

      Let me know if this works for u.

      Happy Automating !
      Harshit

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