当文本太大时,QTP 无法获取文本属性

发布于 2025-01-05 18:40:07 字数 360 浏览 4 评论 0原文

我遇到一个问题,当文本太大时,QTP 无法获取 WinObject 的文本属性。在其他情况下,它可以正确获取 Text 属性。

注意:它不会在 Object Spy 中以及在运行时使用 GetROProperty 方法获取 Text 属性。

请参阅下面的屏幕打印,其中工作正常,因为文本不太大。 未获取文本属性 - 使用请求选项卡

但在“响应”选项卡中文本太大且无法读取。所以它无法获取 Text 属性。请参阅下面的丝网印刷。

获取文本属性

I'm facing an issue in which QTP is not fetching text property of a WinObject when the Text is too large. In other cases it's properly fetching the Text property.

Note: It's not fetching Text property in Object Spy as well as at run time using method GetROProperty.

See the below screen print in which it's working fine because the Text is not too large.
Not Fetching Text Property - With Request Tab

But in Response Tab the text is too large & so it's not able to fetch the Text property. See the below screen print.

Fetching Text Property

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜声 2025-01-12 18:40:07

QTP 在 9.0 版本中对文本长度进行了限制,约为 16,383 个字符。
我不确定当前版本中是否也存在此限制。

QTP had this limitation in version 9.0 on text length to be about 16,383 characters.
I am not sure whether this limitation exists in current versions as well.

寄离 2025-01-12 18:40:07

我最近遇到过这个问题,要从 WinObject 读取所有文本,请使用以下代码(这对我有用),

bLargetext=Parent().Child().WinObject("对象名称").Object.Document.text

I had come across this recently, to read all text from WinObject use the following piece of code (this worked for me),

bLargetext=Parent().Child().WinObject("objectname").Object.Document.text

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文