51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2446|回复: 3
打印 上一主题 下一主题

[Robot] 有哪位高手知道robot里的SQAGetProperty的用法?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-6-8 14:23:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
有哪位高手知道robot里的SQAGetProperty的用法?我看了帮助,还不是很明白,希望有知道的高手不吝赐教啊
在线等待-------
谢谢啦
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏

该用户从未签到

2#
发表于 2005-6-9 09:22:14 | 只看该作者
获取对象的方法和属性
SQAGetProperty(recMethod$, property$, value)
recMethod$ :The recognition method values you use to identify an object
property$:是你所要读取的属性的名称, 它是区分大小写的。
Result:函数的返回值 (见备注)
Value:对象的属性或取值
然后可以运用if 语句与预期结果进行比较,来达到测试的目的
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2005-6-9 09:22:45 | 只看该作者
Result = SQAGetProperty (ObjectRec, "State", CheckState)
If Result = sqaSuccess And CheckState = 0 Then
CheckBox Click, ObjectRec
End If
Result:
0        sqaSuccess        Command executed successfully.
1001        sqaNoObjectSpecified        recMethod is empty.
1002        sqaInvalidRecString        Invalid syntax in recMethod.
1003        sqaObjectNotFound        The specified object could not be found.
1004        sqaNoPropertySpecified        The property$ argument is empty.
1005        sqaPropertyNotFound        The specified property could not be found.
1006        sqaErrorGettingProperty        An error occurred while getting a property value.
1007        sqaArraysNotSupported        No index was specified for an array of property values.
1008        sqaPropertyIsNotArray        An index was specified for a property that does not contain an array of values.
1009        sqaPropertyHasNoValue        The property has no value or is currently not applicable. A property that has no value is not the same as a property with a value of 0 or null. For example, the ItemSelected property for an empty list box has no value.
1010        sqaPropertyNotSupported        The property is not supported. This status typically results when the operating system you are testing on does not support a property ?for example, the NumbersOnly property for an edit box is not supported under 16-bit Windows.
1011        sqaUnableToConvertString        Cannot convert the specified property value to a String.
1012        sqaPropertyIsReadOnly        The property value is read-only and cannot be modified.
1013        sqaInvalidDataType        The data type of the property cannot be converted to a Variant. With  SQASetProperty commands, the type (VarType) of Variant cannot be converted to a property.
1014        sqaInvalidPropertyValue        Invalid property value. For example, this error occurs if you try to set the State property for a check box to a value that is not one of the property's choices (Checked or Unchecked).
1015        sqaIndexOutOfBounds        The array index is not within the bounds of the array.
1016        sqaTimeout        The specified object could not be found within the specified time, or (with SQAWaitForPropertyValue) was not equal to the specified time.
1017        sqaNoMethodSpecified        No method was specified in Object Method.
1018        sqaMethodNotFound        The method specified in Object Method does not exist.
1019        sqaErrorInvokingMethod        An error occurred while attempting to execute the method. A likely cause is either that the method does not exist or the method arguments are invalid.
1020        sqaErrorSettingProperty        An error occurred while setting a property value with SQASetProperty.
1030        sqaOutOfMemory        There is not enough memory to run this command.
1031        sqaUserAbort        The operation was canceled ?for example, by pressing F11.
1040        sqaUnknownError        An unknown error occurred.
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2005-6-9 09:59:41 | 只看该作者
非常感谢winterwindy!谢谢!
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-26 19:40 , Processed in 0.078227 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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