Configuring Window Mode

Applies to TestComplete 14.30, last modified on November 21, 2019

Web pages embed SFW movies by using OBJECT or EMBED tags. These tags have the wmode parameter that specifies how the page shows the SFW file.

Depending on the wmode parameter value, a web browser may block the test recording and Object Spy. To create tests for your Flash and Flex applications correctly, you may need to set the parameter to a proper value.

Note: The parameter does not affect the test run. If you have a recorded test, it will run correctly regardless of the wmode parameter value.

Supported Window Modes

In Internet Explorer

You can set the wmode parameter to any value you need.

In Mozilla Firefox

  • If you have asynchronous plugin rendering enabled in Mozilla Firefox, the wmode parameter can have any value, it will not affect creating tests.

    To enable the asynchronous plugin rendering:

    1. Start Firefox and type about:config in the Address bar. This will open the Firefox settings page.

    2. Find the dom.ipc.plugins.asyncdrawing.enabled property in the list and set it to true. If you use Firefox 52 or later, the property is set to true by default.

  • Otherwise, set the wmode parameter to the following value —

    opaque

In Google Chrome

Set the wmode parameter to one of the following values —

  • opaque

  • transparent

Setting the WMode Parameter in the Source Code

You can change the value of the wmode parameter in 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 page’s source code, find the swfobject.embedSWF or AC_FL_RunContent function call and/or the object and embed tags (depends on the way the page embeds your Flash or Flex application).

  3. Depending on the web browser you use, set the needed value of the wmode parameter. Below are possible HTML code snippets with the wmode parameter set to opaque:

    • 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="opaque">
          <embed src="MyTestedApp.swf" quality="high" wmode="opaque" 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 = "opaque";
        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#version=10,0,0,0',
          'width', '500',
          'height', '300',
          'src', 'MyTestedApp',
          'quality', 'high',
          'wmode', 'opaque',
          'pluginspage', 'http://www.adobe.com/go/getflashplayer',
          'movie', 'MyTestedApp'
      );
      </script>

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

If you have no access to the web page’s source control, record a test in another web browser that supports the needed window mode, correct the recorded test and run it for the needed browser.

See Also

Preparing Flash and Flex Applications for Testing with the Debug Version of Flash Player

Highlight search results