Test Package for Mozilla Firefox will be a feature pack for Visual Studio 2010 that enables playback of UI actions on a website/web application that have been recorded on Windows Internet Explorer 7 and 8 on Mozilla Firefox web browser. Currently this is in Beta stage and will be released with VS 2010 Feature Pack.
Please note that recording UI actions on Mozilla Firefox is not supported. There is no UICL (UI control Locator) support for controls in Mozilla Firefox. The Benefit of this model is that any recording in IE would playback in Mozilla Firefox without any code change. Even the assertions added through UICL to verify the state/properties of controls need not be changed for validation in Mozilla Firefox. With one time recording in IE, we can playback in IE or Mozilla Firefox any number of times. Thereby all the CodedUITest projects recorded for IE or scenarios recorded in MTM would seamlessly playback in Mozilla Firefox, by just enabling the Mozilla Firefox plugin.
Please take a look at this blog for information related to Record & Playback on IE applications.
This package enables playback of UI actions on the following versions of Mozilla Firefox
· Mozilla Firefox 3.5 and above are supported.
The user could have multiple versions of Mozilla Firefox installed & multiple languages of the same version of Mozilla Firefox installed. The playback provides the user to choose the version & language of Mozilla Firefox on which the playback is supposed to happen. While doing playback using MTM, all the Firefox versions installed on the machine are displayed to the user to choose from. In case of CodedUITest the user can set the BrowserWindow.CurrentBrowser property to any of the installed versions & playback chooses the mentioned Mozilla Firefox version for playback.
Ex: BrowserWindow.CurrentBrowser = “Firefox 3.5.7(ar)” would choose the 3.5.7 Arabic Version of Mozilla Firefox for playback. Setting the CurrentBrowser property to “Firefox” would choose the default version of Mozilla Firefox installed for playback. Check the registry key under HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox to know the names of all the Mozilla Firefox versions installed in your machine and use these names to set the CurrentBrowser property. You can also specify the CurrentBrowser property through CodedUITestCurrentBrowser Environment variable. CUIT would read this environment variable & set the CurrentBrowser property itself as a part of test initialization. This is a better way to choosing browser for playback as it wouldn’t involve changing your CodedUITest & you can manipulate the browser for playback using this environment variable.
This Package is compatible with and can be installed on top of the following SKUs that are available as part Visual Studio:
· Microsoft Visual Studio 2010 Premium and Microsoft Visual Studio 2010 Ultimate (For CodedUI Test)
· Microsoft Visual Studio Test Professional 2010 (For Action Recording)
· Microsoft Visual Studio Agents 2010
The below msdn article contains all the necessary information to install the setup & how to enable Mozilla Firefox playback in MTM and CodedUITest
For Web Applications we can only record on IE. Recording on Mozilla Firefox is not supported. Any recording in IE would playback in Mozilla Firefox without any code change. Thereby all the CodedUITest projects recorded for IE or scenarios recorded in MTM would seamlessly playback in Mozilla Firefox, by just enabling the Mozilla Firefox plugin.
Playback (or automation) very simply put is all about finding a UI-object based on certain properties (say button named “OK” in a dialog named “Confirmation”) and performing some action on it (say clicking the OK button). Hence there are two parts to this problem “Search” and “Action”.
The general workflow for doing playback in Mozilla Firefox is similar to that of IE. So the concepts & workflows are same for both IE and Mozilla Firefox. If you already know the details of Record and Play of IE application, you can assume that most of them apply to Mozilla Firefox applications also
Please take a look at this blog for known Issues and troubleshooting tips on IE as most of them apply to Mozilla Firefox also. Since you have to use IE to record actions, it is always good to know how to troubleshoot Record & Play failures in IE
Most of the exceptions thrown also contain the primary properties of the control on which the playback is being done. We can make use of these properties to search for the control and make sure if it is in an actionable state.
Firebug is a handy extension in Mozilla Firefox to inspect HTML and the DOM tree. We can install it from search in the list of Mozilla Firefox extensions. Using it we can search for controls using search properties & inspect it. Pressing F12 brings up the firebug and displays the properties of the page under display in Mozilla Firefox.
For More information on how to use Firebug for debugging specific playback exceptions refer to the section below on ‘Exceptions & what they mean’.
The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. The tool lets you to explore the document object model (DOM) of a Web page. It lets you to locate and select specific elements on a Web page through a variety of techniques.
This tool can be downloaded at
In IE8, this toolbar is packaged along with the product. Press ‘F12’ in IE8 to invoke this toolbar.
Playback on IE or Mozilla Firefox can fail due to various reasons and the playback engine throws the best exception out of a variety of playback exceptions for the user to root cause the reason for the failure.
Recoding on a unsupported technology App
If the user tries to record on applications on IE whose version is below 7 or on 64-bit IE or on Mozilla Firefox, the recorder throws a technology supported exception.
Playback does two major things in order to perform action on the control search and action on the control. Following are the possible reasons and their exceptions.
First Rule for troubleshooting Mozilla Firefox playback issues: Whenever there is a playback failure in Mozilla Firefox, do a playback of the same recording on IE. If the playback fails in IE also, follow the troubleshooting tips in the IE user guide located here to root cause the issue. If the playback succeeds in IE but fails in Mozilla Firefox , follow the comments mentioned below depending on the type of exception being thrown.
Following are some of the suggested tips to debug the search failure during playback.
The control does not exist or search properties are not enough to find the control.
Use the Firebug tool to see whether the search properties are correct and make sure if the control can be found. If control exists in the Mozilla FireFox document then check whether the DOM hierarchy of the control is same in both IE & Mozilla FireFox. For more information on DOM Hierarchy mismatch refer to 2nd Point in the ‘Known Issues – Issues in Mozilla FireFox Playback’ section.
The control does not exist in the app now.
Whenever the playback performs an action on a control, it is cached for future references. When the playback tries to act on this cached control which is no longer available, the playback throws this exception.
Sometime though the search passes but the playback may not be able to do the action on the control. Following may be the possible reason/tips to debug the issue
Playback is trying to perform action on a disabled control
This is thrown when the playback try to do some action on the disabled control/read only controls. Following are some of the cases:
· SetValue on a read only combobox/text box
· Click/SetState on disabled buttons/checkboxes
When the playback tries to act on a control which is present but is not visible
The control cannot be visible when we set the CSS styles of the control to be hidden. The user has to make the control visible before the playback can perform any action on it.
The control exists but not actionable
Thrown when a control is blocked in this case though the search passes but the required action will not be played back. Following might be some of the causes for this exception
· The control is not visible in the view port and not scrollable even
· Control is blocked due to some modal dialog on top of it
May come in password text box
When the decoding of encrypted password fails due to incorrect key value.
Default fall back exception for uncategorized issues
For any other failure the playback engine would throw PlaybackFailureException. For example if Get/Set of some property fails for a control playback engine would throw PlaybackFailureException.
In this blog we have seen the VS 2010 support for Mozilla Firefox browser support for Fast Forward and CodedUITest and how to troubleshoot playback failures in Mozilla Firefox applications.
Author – R Praveen
SDET - CodedUITest