Micro Focus QTP (UFT) Forums
How to begin with Flex automation using QTP? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to begin with Flex automation using QTP? (/Thread-How-to-begin-with-Flex-automation-using-QTP)



How to begin with Flex automation using QTP? - vibhakhushi - 12-06-2010

Hello everybody,
I am a newbie in Automation. We have developed our flex application and its running properly. Now we have decided to automate it. How should I begin?

I have done the following things:
[1]. Installed Flex-plugin for QTP.
[2]. Included the libraries for automation.swc, qtp.swc and others.

In mxml file I have set automationName for FormItems like Username, Password etc. But still QTP is not recognizing them. I know I am wrong. But I am not getting where I am wrong. Pls help me in this regard.

This is the sample code:
Code:
<mx:VBox horizontalAlign="center" paddingBottom="10" paddingTop="5" height="365" width="603">
    <mx:Spacer height="44" width="4"/>
    <mx:Label text="Virtual Learning Environment"  fontSize="12"/>
    <mx:Form id="form" height="114" borderStyle="none">
        <mx:FormItem id="uName" label="User ID:" automationName="Username">
            <mx:TextInput id="username"  enter="loginPress()"/>
        </mx:FormItem>
        <mx:FormItem id="pwd1" label="Password:" automationName="Password">
            <mx:TextInput id="password" displayAsPassword="true" enter="loginPress()"/>
        </mx:FormItem>
        <mx:CheckBox id="rememberMe" label="Remember Me" paddingLeft="75" automationName="Remember Me"/>
    </mx:Form>    
    <mx:Button id="register" label="Login" click="loginPress()" height="30" width="110" fontSize="10" automationName="LOGIN_Button"/>
    <mx:Text id="statusMessage" width="90%" height="22" styleName="error" textAlign="center"/>
    <mx:Spacer height="1" width="8"/>
    
    <mx:VBox height="79" width="516">
    <mx:Label text="    Not a VLE User yet? Click the button below to register yourself"  fontSize="12" width="505"/>
    <mx:Spacer height="15"/>
    <mx:HBox width="100%">
        <mx:Spacer width="196" height="0"/>
        <mx:Button id="registerUser" label="Register Me" click="registerUserAccount()" height="30" width="110" fontSize="10"/>
    </mx:HBox>
    </mx:VBox>
    </mx:VBox>