本文介绍了如何在QTP中测试标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用QTP 9.5测试我编写的应用程序德尔福我安装了Delphi加载项和QTP可以识别Delphi控件.大多数,但不是全部,特别是TLabel.QTP无法识别这一点控制,并被Object Spy忽略.任何建议,提示,线索如何测试标签?

I'm using QTP 9.5 test my application written in Delphi. I got Delphi Add-in installed and QTPcan identify Delphi controls. Most but not all,specially TLabel. QTP can not recognize thiscontrol and is being ignored by Object Spy.Any suggestion, tip, clues how to test labels ?

欢呼!

推荐答案

您是否尝试过使用TStaticText而不是TLabel?
它们是带有窗口句柄的标签(从TWinControl而不是TGraphicControl降序),这意味着它们可以从外部获取Windows消息.
我猜这是你的问题.(只是一个猜测,因为我不知道QTP)

Have you tried with TStaticText instead of TLabel?
They are Labels with a Window Handle (descending from TWinControl instead of TGraphicControl) which means they can get Windows messages from the outside.
I'm guessing that it's your problem. (only a guess as I don't know QTP)

这篇关于如何在QTP中测试标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 10:10