Download Adobe Flex Buttonbar Example

Posted on -

.Mercury Interactive Corporation or its wholly-owned subsidiaries, Freshwater Software, Inc. And Mercury Interactive (Israel) Ltd. In the United States and/or other countries.

This product includes software developed by the Apache Software Foundation (Macromedia Flash 8 video is powered by On2 TrueMotion video technology. © 1992-2005 On2 Technologies, Inc.

All Rights Reserved. Www.on2.com.Contents Chapter 1: Working with QuickTest Professional.5 Introduction to the testing process.

5 Deploying Flex files.Contents.CHAPTER 1 Working with QuickTest Professional This topic describes how to work with Mercury QuickTest Professional™ and Adobe Flex applications. Contents Introduction to the testing process. 5 Test creation overview.Before you can test a Flex application, a Flex developer compiles a SWF file for you. The developer also provides you with an HTML file that embeds the SWF file in it. This is known as the HTML wrapper. You deploy these two files to any web server. Some Flex applications require the use of external resources, such as web services or remote objects, so you should ensure that your web server can access these resources.About the Flex installed testing files The Flex support for QTP requires that you install two ActiveX plug-ins on the testing machine.

These plug-ins provide the necessary communication layer between Flex and QTP. One plug-in runs inside of QTP, and the other runs inside the browser. The browser plug-in is signed, and is designed to run in Microsoft Internet Explorer 6 on Windows only.Test creation overview When you record a test, QTP records the lines of the test script correlating to each action that you performed. Each line typically represents an action that you carried out on a component that appears on the screen. Those components are called objects and the actions you perform on them (such as clicking a button) are called operations.Operations are actions that you perform on objects.

They are equivalent to a Flex event, but are generally at a higher level. For example, when you click on a Button, QTP records a “click” operation. QTP does not record the mouseDown and mouseUp events, which essentially make up the click event.The following example shows a Flex Button control in the QTP Repository Editor: Application hierarchy Test object name Test object model class Flex properties used to identify this object When you run a test and interact with a Flex control, QTP does the following: Identifies the test object class that your Flex object maps to.About the application hierarchy In the object repository, objects are stored in a hierarchy. The root of the hierarchy is the browser. The next element is the Flex application. Under that are the containers and controls that make up the application. In the QTP Object Repository and Keyword View, a tree-like structure represents the levels of containers in the application.Recording tests To record a test in QTP, you must compile the application’s SWF file and generate the HTML wrapper files.

The main wrapper file defines the application as an object on the page and embeds it so that Flash Player is invoked when the page is requested. You cannot request the application’s SWF file directly.When you play back the test, QTP opens the browser and requests the same URL. Be sure to specify an HTML file or other wrapper file type that embeds the application’s SWF file. You should not request the SWF file directly.

About the testing script QTP records the test in an object level view called the Keyword View, and a text-only view of steps called the Expert View.property is the event dispatched by the object that QTP records. This property can take zero or more parameters. The number and type of parameters depend on the type of control that is dispatching the event. They can be a key that was held down during the operation, an index of a list entry, or the text entered in a text field.If the FlexButton object has no label, QTP uses the ToolTip of the Button for the test object name. If there is no label and no ToolTip, QTP uses the source code’s property. If the Flex developer did not specify an, QTP uses the index.QTP stores a set of parameters for each operation that define aspects of the operation.

Adobe Flex Sdk Download

These parameters include what keys were held down when the mouse was clicked or the X and Y position of the target in a drag and drop operation. Operation parameters also record where the interaction originated —for example, from the keyboard or the mouse.Using checkpoints Checkpoints let you examine objects and fail or pass the test based on whether the object contains the value you expected. During the test, QTP compares the current value against the expected value in the checkpoint. If the values do not match, then the test fails. If they do match, the test passes.Bitmap checkpoints When using Bitmap Checkpoints, ensure that you account for differences in the appearance of Flex objects. These differences can be due to tab focus on a test object or to the object’s reaction to a mouseOver event.

If you add a bitmap checkpoint on a region of the application that has an object with focus (and has the halo effect around that object), you must ensure that your object has focus during the test.You can use the common methods and properties in the Keyword or Expert views. The following example uses the method to check whether the CheckProperty visible property of the myList control is set to in Expert View: false Browser('My Page').FlexApplication('MyApp').FlexCheckBox('myList'). CheckProperty 'visible', false For information about each of these methods and properties, see the QuickTest Professional Object Model Reference.Working with QuickTest Professional.CHAPTER 2 Advanced Concepts This topic describes advanced concepts when using Mercury QuickTest Professional to test Flex applications. Contents Working with containers.

21 Working with Repeater objects.Working with Repeater objects Repeater objects are visible in the QTP object hierarchy and scripts, and contain the child objects that they have created. In an actual Flex application, these child objects are children of the main container and not the Repeater object.

In QTP table checkpoints, both models are accounted for.If QTP does not record interactions with your Flex application, you should try to determine if the plug-in is installed. The following problems are the most common: Flash Player is not the right version. Internet Explorer is not the right version. Internet Explorer has plug-ins turned off.Run MicLogSetting.exe.

The MicLogSetting dialog box appears: From the Level drop-down list, select MicLogLevelDebug2 as the level. In the Folder field, select a folder where the log file is saved. From the Available Categories list, select LogCatPackTEA, and click the right arrow button to move it to the Selected Categories list.Your scripts are failing in a spot where they should not be. There are several solutions to these timing issues, which are described in the following sections. Adding waits to scripts You can use the Wait statement to pause a script’s playback for any number of seconds. You pass Wait(numseconds) as an argument to the operation you want to pause in the script.In the Options dialog box, select the Run tab.

Download Adobe Flex Buttonbar Example For Beginners

Select the Normal option for the Run mode. This is the default option. Increase the amount of the Delay Each Step Execution By option to some number of milliseconds.

DownloadExample

The default value is 0. Click OK to save your changes.In the Options dialog box, select the Web tab: Increase the amount of the Add n Seconds To Page Load Time option to a number large enough to ensure that your application compiles before QTP starts running the test.

Download Adobe Flex Buttonbar Example

The default value is 10.Making a test fail but continue to the end You may encounter situations where you cannot make the test fail or pass from a script and still continue to the end. Specifically, this has been reported for tests that change a formula within a Data Table.Limitations of automated testing with Flex The Flex integration with QTP includes the following limitations: Flex test objects do not show up in the Object Identification (Tools Object Identification) dialog box. Therefore, you generally do not configure the way QTP gets an object or customize which properties QTP stores.Advanced Concepts.