51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 6886|回复: 12
打印 上一主题 下一主题

[求助] 关于GetVisibleText

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-1-26 17:09:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
GetVisibleText这个api,到底是vbscript中的一个内置api,还是qtp中一个api?在哪里能找到它的详细定义!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2007-1-26 19:54:27 | 只看该作者
Description

Returns the text from the specified area.

Remarks

The area is defined by pairs of coordinates that designate two diagonally opposite corners of a rectangle.


Notes:


The GetVisibleText method may behave differently in different run sessions depending on the operating system version you are using, service packs you have installed, other installed toolkits, the APIs used in your application, and so on.
   
To avoid failed runs, it is highly recommended to use the GetROProperty method or the Object property to retrieve the value of the text (or equivalent) property from an object in your application instead of using the GetVisibleText method.
   
This method is supported only in Windows 2000 and Windows XP.
   
You can also check whether a specified text string is contained in a specified window area using the TextUtil.GetText method. For more information, refer to the Utility section of the Object Model Reference.


Syntax


object.GetVisibleText ([Left], [Top], [Right], [Bottom])


Argument Description
object A test object of type ActiveX.
Left Optional. A Long value. The left coordinate of the search area within the object抯 window.  
Top Optional. A Long value. The top coordinate of the search area the object抯 window.  
Right Optional. A Long value. The right coordinate of the search area within the object抯 window.  
Bottom Optional. A Long value. The bottom coordinate of the search area a within the object抯 window.

Note: If the Left, Top, Right, and Bottom arguments are not specified, the method returns all of the text within the visible part of the specified object.  

Return Type

A String value.
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2007-1-27 14:46:06 | 只看该作者
为什么我在qtp的object model reference 中没有发现呢?真是奇怪!
有高人在指点一下好么?
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2007-1-27 20:06:35 | 只看该作者
你按F1不就有了,呵呵。
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2007-1-27 20:44:21 | 只看该作者
在QTP界面内,俺F1或者选择 HELP-QTP HELp 都可以。
回复 支持 反对

使用道具 举报

该用户从未签到

6#
 楼主| 发表于 2007-1-28 14:10:46 | 只看该作者
谢谢各位的回答,我知道是按F1或者是Help-qtp help。我想说的是在这些操作之后(F1或者help-qtp help),出现的chm帮助文件中,我没有发现GetVisibleText这个api的定义,我甚至用了搜索,还是搜索不到!真是见鬼了。难道我转的qtp不好,或者是我装的是9.0!郁闷中。。。。。
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2016-2-27 08:48
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    7#
    发表于 2007-2-2 20:26:22 | 只看该作者
    原帖由 lileo 于 2007-1-28 14:10 发表
    谢谢各位的回答,我知道是按F1或者是Help-qtp help。我想说的是在这些操作之后(F1或者help-qtp help),出现的chm帮助文件中,我没有发现GetVisibleText这个api的定义,我甚至用了搜索,还是搜索不到!真是见鬼 ...


    打开QTP后按下F1,出现帮助后,在“输入要查找的关键字”下面的输入框内输入GetVisibleText,然后按下回车键,你应该在刚刚输入的GetVisibleText 下面看到有: GetVisibleText Method (ActiveX)、GetVisibleText Method (AcxButton),一直到最后一个 GetVisibleText Method (WinTreeView)。同时在右边出现了对这些方法的详细解释。如果你没有看到,那么就是你安装的QTP不完整。

    [ 本帖最后由 walker1020 于 2007-2-3 11:12 编辑 ]
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    8#
    发表于 2007-8-13 18:44:32 | 只看该作者
    我这边也没有找到,郁闷,我qtp是9.2。安装是完全安装的。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    9#
    发表于 2007-8-14 00:42:23 | 只看该作者
    谁能给我一个中文的object model reference
    mail:archsatan@gmail.com
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    10#
    发表于 2007-8-14 09:11:52 | 只看该作者
    应该是QTP中的一个API吧,按F1就可以看见了
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    11#
    发表于 2007-8-14 09:12:04 | 只看该作者
    呵呵,多学习吧
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    12#
    发表于 2007-8-15 10:21:53 | 只看该作者
    zhcihi
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    13#
    发表于 2009-9-10 10:34:17 | 只看该作者

    QTP中的GetVisibleText属性

    我在用QTP做自动化测试的时候,我用这个属性去取SwfComboBox对象的文本,得到的文本有点奇怪,在文本的后面加了一些"IC_CHECK_PATTERN",不知道是为什么
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-20 11:45 , Processed in 0.083525 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表