Configuring Window Mode

Applies to TestComplete 14.10, last modified on June 5, 2019

To properly test an Adobe Flash or Flex application with the debug version of Flash Player in Mozilla Firefox, the application must be running in the windowed mode. That is, the WMode parameter of the tested Flash of Flex movie embedded into a wrapper web page must be set to window (the default value). If this parameter is set to opaque or transparent, TestComplete will not be able to recognize the objects of the application running in Firefox. However, this restriction does not apply to applications running in Microsoft Internet Explorer.

You can change the value of the WMode parameter by modifying the source code of the application’s wrapper web page:

  1. Open the wrapper web page of your tested Flash (Flex) application in any text or HTML editor.

  2. In the source code of the page, locate the swfobject.embedSWF or AC_FL_RunContent function call and/or the object and embed tags that embed your Flash (Flex) movie into the page (this depends on the way your application is embedded into the wrapper web page).

  3. Either remove the wmode parameter from the above-mentioned function calls or web page elements, or set its value to window. Below are possible HTML code snippets with the wmode parameters highlighted:

    • Example 1

      HTML

      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" width="500" height="300">
          <param name="movie" value="MyTestedApp.swf">
          <param name="quality" value="high">
          <param name="wmode" value="window">
          <embed src="MyTestedApp.swf" quality="high" wmode="window" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="300"></embed>
      </object>

    • Example 2

      HTML

      <script type="text/javascript">
        var flashvars = {};
        var params = {};
        params.quality = "high";
        params.wmode = "window";
        params.bgcolor = "#869ca7";
        var attributes = {};
        attributes.id = "MyTestedApp";
        attributes.name = "MyTestedApp";
        attributes.align = "middle";

        swfobject.embedSWF(
          "MyTestedApp.swf", "flashContent",
          "100%", "100%",
          "10.0.0", "playerProductInstall.swf",
          flashvars, params, attributes);
      </script>

    • Example 3

      HTML

      <script type="text/javascript">
      AC_FL_RunContent(
          'codebase', 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab',
          'width', '500',
          'height', '300',
          'src', 'MyTestedApp',
          'quality', 'high',
          'wmode', 'window',
          'pluginspage', 'http://www.adobe.com/go/getflashplayer',
          'movie', 'MyTestedApp'
      );
      </script>

  4. Save the changes made to the web page’s source code.

See Also

Preparing Flash and Flex Applications for Testing via the MSAA Engine

Highlight search results