TestComplete9 测试Flash UI的初始化问题
1、第一次使用TC9 测试Flash UI,会存在“Loaded .SWF File Not Prepared for Testing”的问题。 2、点击Help弹出帮助: You may receive this message when trying to record a test against a Flex or Flash application or when exploring the application with the Object Spy. TestComplete displays this message if the Flash or Flex application under test was not prepared for testing. To get access to a Flash or Flex application’s internal objects and to their public properties,prepare the application in one of the following ways:
在这里选择第二种方法。 3、到安装目录下:C:Program Files (x86)SmartBearTestComplete 9Open AppsFlex 寻找:RuntimeLoader文件夹 4、 Testing Flash and Flex Applications with the Runtime Loader UtilityOne of the approaches to testing Flash and Flex applications with TestComplete is to run such applications from the Runtime Loader utility shipped along with TestComplete. The topics of this section provide information on specifics of using Runtime Loader to run Flash and Flex applications to be tested. In This Section
Provides general information about testing Flash and Flex applications with Runtime Loader.
Contains information about limitations on using Runtime Loader for testing Flash and Flex applications.
Describes general preparations you may need to do before testing your Flash or Flex application.
Lists the files the Runtime Loader utility includes.
Explains how to run a Flash or Flex application under Runtime Loader.
Explains how to create a custom runtime loader for Flash and Flex applications.
Describes common problems and solutions for using Runtime Loader with Flash and Flex applications.
5、 Preparing Flash and Flex Applications for Testing with the Runtime Loader UtilityTestComplete provides you with extended abilities for creating flexible tests for Flash and Flex applications using the Runtime Loader utility. In order to test your Flash and Flex applications,you do not have to change your code in any way. You may need to perform some preparations before the testing. Below is the list of preparations that you may need to perform before testing your Flash or Flex application. These preparations include general preparations that configure the environment and method-specific preparations that are needed to be able to get access to the application’s internals with the Runtime Loader utility.
In order to prepare your Flash or Flex application for testing with the RuntimeLoader utility,go through the following steps:
6、 Running Flash and Flex Applications with the Runtime Loader UtilityIn order to get access to Flash or Flex applications’ internals using the Runtime Loader helper utility,you have to run the tested application under the Runtime Loader utility. To prepare your application properly,you have to do the following: 1. Copy Runtime Loader Files to the Tested ServerIn order for Runtime Loader to be able to load your Flash or Flex application successfully,the Loader’s file must reside on the computer where the tested application resides. Copy Runtime Loader files from the <TestComplete>Open AppsFlexRuntimeLoader folder to the computer where the application to be tested resides. If the application is located on a web server,deploy Runtime Loader to that server. We recommend that you put Runtime Loader’s files to the same folder where the tested application’s SWF file resides. If the location of your application does not change,you can copy Runtime Loader files only once when you start creating tests for your application. There is no need to copy them before each test. 2. Use RuntimeLoader.html as Start PageRuntime Loader exposes objects of those Flash and Flex applications that were launched by it,so you should make the RuntimeLoader.html web page the start page for your tests. For a detailed description of how to open the page and specify the tested application manually and how to automate this process,see Runtime Loader Page Description. 7、如上所述 将Runtime Loader files目录下的三个文件全部拷贝到被测对象的安装目录下D:SAPSCC-3_2servicesEmbeddedWebContainercontainerJetty-7.6.2.v20120308workjetty-0.0.0.0-8282-scc.war-_scc-any-webapp,在这里有我们的main.swf和index.html。 8、然后采用RuntimeLoader.html代替原有的index.html才启动网页。 https://dewdfgwd00812:8283/scc改为https://dewdfgwd00812:8283/scc/RuntimeLoader.html 之后填写main.swf 完整的地址为:https://dewdfgwd00812:8283/scc/RuntimeLoader.html?url=main.swf&useNetwork=true 9、录制完成以后 10、点击运行 11、 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |