1.GetTOProperty()
● 基本含义:获取对象库中某个对象的某个属性的值。
● 公式:ReturnValue =对象.GetTOProperty("封装属性名")
● 基础示例:
ValueOfTo=Browser("百度一下,你就知道").Page("百度一下,你就知道").Link("新 闻").GetTOProperty("text")
msgbox ValueOfTo
2.GetTOProperties()
● 基本含义:获取对象库中某个对象的所有属性的值。
● 公式:ReturnValue =对象.GetTOProperties()。
● 基础示例:
set properties = Browser("百度一下,你就知道").Page("百度一下,你就知道").Image("logo").GetTOProperties
propertiesCount=properties.count
msgbox propertiesCount
For i = 0 To propertiesCount-1 Step 1
proname=properties(i).name
provalue=properties(i).value
print proname&"="&provalue
Next
3.SetTOProperty()
● 基本含义:设置对象库中某个对象的某个属性的值。
● 公式:对象.SetTOProperty“封装属性名”,“封装属性值”。
● 基础示例:
Browser("百度一下,你就知道").Page("百度一下,你就知道").WebButton("百度一下").SetTOProperty "name","百度一百万下"
MsgBox "时间停止,大家一起欣赏此时对象库中WebButton"百度一下"的name值!"
4.GetROProperty()
● 基本含义:获取实际在运行时的某个对象的某个属性的值(不是从对象库里面获取)。
● 公式:ReturnValue =对象.GetROProperty("封装属性名")。
● 基础示例:
Browser("百度一下,你就知道").Page("百度一下,你就知道").WebEdit("搜索关键字").Set "QTP"
value=Browser("百度一下,你就知道").Page("百度一下,你就知道").WebEdit("搜索关键字").GetROProperty("value")
msgbox value
- 浏览: 26041 次
- 性别:
- 来自: 上海
最新评论
发表评论
-
vbs class的调用及字典的应用代码
2014-03-17 12:07 608<!--StartFragment -->Cla ... -
QTP中利用DOM实现拖动浏览器滚动条
2014-01-10 16:48 523QTP中利用DOM实现拖动浏览器滚动条 有的时候需要在 ... -
QTP11使用DOM XPath以及CSS识别元素对象
2013-12-23 15:54 811我们知道,像DOM,Html,CSS,XPath等对对象的 ... -
QTP之有关富文本框赋值
2013-10-21 17:35 1157前段时间在做QTP脚本时,遇到一个问题,主要问题是给富文本框 ... -
QTP简单框架之EXCEL报表
2013-10-15 15:06 974Dim oReporterManager Set oRepo ... -
QTP如何检查WEB对象是否隐藏
2013-10-10 10:38 569在WEB页面中隐藏对象的3种方式1、使用display例如: ... -
QTP登录案例
2013-09-22 18:20 827SystemUtil.Run "http://1 ... -
判断datatable中的数据是否有重复数据
2013-09-13 12:06 1525rowcount= DataTable.GetSheet(&q ... -
QTP测试报告代码
2013-09-09 12:59 789自动化测试实际是将测 ... -
京东网:疯狂抢购、猜您喜欢等模块下的图片超链接自动化测试
2013-09-02 17:30 513SystemUtil.Run "http://ww ... -
测试自动化实现难点—Web对象的识别
2013-08-30 13:25 675静态Web对象的识别 序号 ... -
京东网京东快报超级链接验证
2013-08-30 12:37 986SystemUtil.Run "http://www ... -
获取背景颜色
2013-08-27 15:02 744Browser("ITeye Java编程 Spr ... -
Dictionary 字典对象
2013-08-23 11:32 832... -
Scripting.Dictionary对象
2013-08-23 11:08 1350[vb] view plaincopy ... -
测试自动化设计 - GUI层面向对象的扩展设计
2013-08-23 10:48 612测试自动化设计 - GUI层面向对象的扩展设计 ... -
对WebElement对象使用编程性描述
2013-08-08 18:18 2277对WebElement对象使用编程性描述(Using Pro ... -
vbs中get和set方法
2013-08-07 13:23 934Class User Private s_name ... -
QTP关闭多余的browser窗口
2013-08-02 14:23 509要判断打开了几个浏览器窗口,我们使用description对 ... -
QTP如何打开浏览器,并进入网站,关闭浏览器
2013-08-02 14:10 1541简单记录下打开浏览器的方法 '打开IE,进入系统----- ...
相关推荐
Ling to sql
解决VirtualBox启动Unable to load R3 module问题,解决无法启动Android模拟器。
10 Tips to Help You Achieve Your Software Testing Documentation Goal 10 Tips to Help You Achieve Your Software Testing Documentation Goal
Best practice is to add your .sh file here with a similar naming style reflecting your username and hostname, then symlink on the local checkout: ln -s ro.sh-stain-ralph ro.sh ./v0.
当更新SVN时,出现Failed to run the WC DB work queue
For example, downstream modules are af- fected by earlier modules, and the per- formance of the entire system is not ro- bust to the accumulated errors. This pa- per presents a novel end-to-end ...
c# Winform PDF和Base64格式互相转换;PDF转换Base64格式,Base64转换PDF
RO05 - How to Write a RemObjects SDK... RO06 - How to Write a RemObjects SDK... RO07 - Smart Services?/a> RO08 - Smartening our First Server RO09 - RemObjects 2.0 Session Managers RO10 - Stop Calling ...
INTRODUCTION TO CRACKING WITH OLLY 11-20----en原文为西班牙文
libevent-2.1.12-stable openssl1.1.1f 在windows环境下使用mingw编译 包含libevent 下的lib、include、bin和openssl的lib、include、bin 自己项目使用
ROS Robot Programming,包括ROS的产生、搭建、教学等一些列教学
VMware虚拟机中ubuntu安装VMware tools
to detect foreground objects in single images1Institute of Mathematics of the Ro
test file to upload ro activate acc
有关as400的学习内容...............................................
全结构遗传优化径向基概率神经网络
Ros ZED Wrapper is a ros core driver to develop ZED programs and to include the stereo vision on C programs
Suzuki Roshi presents the basics—from the details of posture and breathing in zazen to the perception of nonduality—in a way that is not only remarkably clear, but that also resonates with the joy ...
Code Decoding Encoder to 2 wheels balancing scotter
Fixed GreenLuma not being able to connect to cracked servers that uses lobby steamclient.dll callbacks Known Bugs: Gmod doesn't work Free apps can't be downloaded Installation: Copy GreenLuma.dll, ...