继续学习,我回来啦!

QTP识别Flex 4.6产品

上一篇 / 下一篇  2014-03-28 13:32:15

公司产品使用Flex 4.6,如果要用QTP就要使用Flex插件

现在软件环境

1.    QTP 11.5

2.    Flex插件:flex4_6_test_automation_plugin.zip(官方)

3.    Flash Builder 4.6/Flash Builder 4.7

需要添加的参数库:

-include-libraries

"C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\frameworks\libs\automation\qtp.swc"

"C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\frameworks\libs\automation\automation.swc"

"C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\frameworks\libs\automation\automation_agent.swc" "C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\frameworks\libs\automation\automation_dmv.swc" "C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\frameworks\libs\automation\automation_flashflexkit.swc" "C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.6.0\frameworks\libs\automation\automation_spark.swc" "D:\program files\HP\Unified Functional Testing\dat\Flash\Flex\HpQTPAgent.swc"QTP11.5中带有)

 

公司研发都是使用Flash Builder 4.7进行编译,开始使用Flash Builder 4.7加上SWC文件后进行编译,可以编译成功,QTP也能正常识别对象。但是在录制过程中,经常出现License错误提示:

enter image description here

文章http://stackoverflow.com/questions/8391865/activating-flex-automation-libraries

里面有提到的一个解决方法:

Here's the answer:

I eluded to this in my question.

If you're using the Flex 4.1 SDK and you want to "activate" your SWF for automation, charting, etc. Then you have to do this:

·        Compile your SWF using a licensed version of Flash Builder 4 WITH a Flash Builder 4 license key

OR

·        Compile your SWF using ANT, MXMLC, COMPC, flex-config and add this to flex-config:

<licenses> 
<license> 
<product>flashbuilder4</product> 
<serial-number>xxxx-xxxx-xxxx-xxxx-xxxx-xxxx</serial-number> <!-- this is a FB 4 license key --> 
</license> 
</licenses>

If you only have a FB 4.5 license key and you're using SDK 4.1, I guess you have no choice but to upgrade to SDK 4.5+.

我与他遇到的问题类似,公司使用4.7的编译器编译SDK4.6的代码,QTP录制的时候出现同样的问题,而且公司使用的编译器还是破解版的,序列号都没有。---------版本匹配的问题的确很麻烦。

 

于是我后来在网上重新下载啦Flash Builder4.6的软件,今天安装好啦,居然编译报内存溢出,郁闷啦~

最后还是摆脱研发帮忙编译下,固然研发的机器比较好。编译成功,并且发行的安装版

 

终于可以用QTP进行录制啦。

开始进行录制的时候,还很正常,没有发生其他异常问题,过了一会,又开始报Licenses错误。彻底失败啦。

 

盗版和破解的软件的确不好用,各种错误。

 

最后只有,当他开始报错后,重新关闭软件,重新开始。

 

 

QTP录制Flex4.6

终于可以开始录制Flex4.6。结果又出现了新问题:添加对象到对象库中,直接提示:

the selected object cannot be added to the object repository

使用对象识别工具明明可以识别到对象怎么就不能添加Button呢?

于是去查看下对象标识

这个是图是没有添加Flex插件看到的对象标识界面

添加了插件后,就会多出来Flex 4.5.0AIR 2.6.0,如果单独选址Flex4.5.0查看对象标识,显示的“测试对象类“就会少很多,如:

FlexButton就没有,所有我无法添加对象到对象库中

之后只有把插件卸载了,奇怪的是,不要插件,直接选址Flex,就可以进行,而且还可以识别对象,添加对象到对象库中,进行录制和回放都可以。



TAG:

 

评分:0

我来说两句

我的栏目

日历

« 2024-05-06  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 40480
  • 日志数: 17
  • 建立时间: 2014-01-02
  • 更新时间: 2017-07-03

RSS订阅

Open Toolbar