Record replay works , but other features of QTP such as object spy, hightlight in application does not work?

July 21, 2011 at 12:08 pm Leave a comment

If you are facing the above situation in QTP, one of the strong reason could be that you are using an incompatable wmode option.

what is that ? in your html, if you have mentioned the wmode value as transparent or opaque, automation does not work with the tools which needs the  hwnd of the flash player.  e.g QTP.

why it does not work?

The window associated with the plugin client is registered using the hwnd. When the swf is loaded through the flash player, which is embedded in the html page, if the wmode is window, there is a separate window (and hence an hwnd-window handle) associated with the player. This is used to uniquely identify the swf for automation.

When the wmode is opaque or transaprent,  there is no separate window for the flash player, hence the unique identification of the flashplayer does not work.  The window gets associated with the browser and since the flash player identity is lost, all the flash components will be recognized as web elements.

What to do?

There is no best solution here other than changing the wmode option.  May be you can use a different html with the required wmode setting for testing.

Some useful information

what is wmode ?

Pre flash player 10

  • wmode– Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.
    • window – movie plays in its own rectangular window on a web page.
    • opaque – the movie hides everything on the page behind it.
    • transparent – the background of the HTML page shows through all transparent portions of the movie. This option can slow animation performance.

    For complete details  refer – http://labs.almerblank.com/2011/03/the-wmode-embed-parameter-de-mystified

What is the significance of transparent and opaque with hwnd ? (taken from http://forums.adobe.com/thread/870713?decorator=print&displayFullThread=true)

By default, the Flash Player gets its own hWnd in Windows. This means that the Flash movie actually exists in a display instance within Windows that lives above the core browser display window. So though it appears to be in the browser window, technically, it isn’t. It is most efficient for Flash to draw this way and this is the fastest, most efficient rendering mode. However, it is drawing independently of the browser’s HTML rendering surface. This is why this default mode (which is equivalent to wmode=”window”) doesn’t allow proper compositing with DHTML layers. This is why your JavaScripted drop-down menus will drop behind your Flash movie.
In windowless modes (like opaque), Flash Player doesn’t have a hWnd. This means that the browser tells the Flash Player when and where to draw onto the browser’s own rendering surface. The Flash movie is no longer being rendered on a higher level if you will. It’s right there in the page with the rest of the page elements. The Flash buffer is simply drawn into whatever rectangle the browser says, with any Flash stage space not occupied by objects receiving the movie’s background color.

Advertisements

Entry filed under: Uncategorized.

Custom component Automation – Part III – Container class extending from non container class Automation double click events in Flex components.

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

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

July 2011
M T W T F S S
« Apr   May »
 123
45678910
11121314151617
18192021222324
25262728293031

Most Recent Posts


%d bloggers like this: