|
3#
楼主 |
发表于 2007-11-15 17:20:38
|
只看该作者
申请精华
哈哈,研究了一天,终于能录制啦!
给大家看些代码。- Browser("/kikaku.mxml").FlexApplication("kikaku").FlexDividedBox("index:16").FlexDividedBox("index:0").FlexPanel("コース情報詳細").FlexTabNavigator("otBaseItemView").Change "共通項目2"
- Browser("/kikaku.mxml").FlexApplication("kikaku").FlexDividedBox("index:16").FlexDividedBox("index:0").FlexPanel("コース情報詳細").FlexBox("共通項目2").FlexForm("index:0").FlexRadioButton("しない").Click
- Browser("/kikaku.mxml").FlexApplication("kikaku").FlexDividedBox("index:16").FlexDividedBox("index:0").FlexPanel("コース情報詳細").FlexBox("共通項目2").FlexForm("index:0").FlexRadioButton("しない_2").Click
复制代码 原因:按照我的第一贴,就可以录制Flex了,但是为什么我没路成功呢,主要是用Flex做的系统有问题,为了能测试,flex做的page编译的时候,需要倒进来automation.swc, automation_agent.swc, and qtp.swc 这几个文件,这样编译出来的系统才能被QTP录制到。
参考资料:官方说明
部分内容如下:- Tasks and techniques for testable applications overview
- Flex developers should review the information about tasks and techniques for creating testable applications, and then update their Flex applications accordingly. QC testing professionals who use QTP should use the documentation provided in the separate book, Testing Flex Applications with Mercury QuickTest Professional. That document is available for download with the Flex plug-in for QTP.
- Use the following general steps to create a testable application:
- Review the guidelines for creating testable applications. For more information, see Creating testable applications.
- Build a testable application or prepare the application to use automation at run time.
- To build a testable application, you include automation libraries at compile time. Compile the application's SWF file with the automation.swc, automation_agent.swc, and qtp.swc files specified in the compiler's include-libraries option. If your application uses charts, you must also add the automation_charts.swc file. For information on the compilation process, see Compiling applications for testing.
- To use automation at run time, you create a wrapper SWF file that is compiled with the automation libraries. In this wrapper SWF file, you use the SWFLoader to load the SWF file that you plan to test only at run time. For more information, see Using run-time loading.
- Create an HTML wrapper with proper object naming. For more information, see Writing the wrapper.
- Prepare customized components for testing. If you have custom components that extend UIComponent, make them testable. For more information, see Instrumenting custom components.
- Deploy the application's assets to a web server. Assets can include the SWF file; HTML wrapper; external assets such as theme files, graphics, and video files; module SWF files; and run-time shared libraries (RSLs). The QC professional must be able to access the main application. For more information about QTP, see Testing Flex Applications with Mercury QuickTest Professional.
-
- --------------------------------------------------------------------------------
复制代码
[ 本帖最后由 coomon2000 于 2007-11-15 17:22 编辑 ] |
|