偶是测试新手,希望前辈们能多多指教。

GetROProperty,GetTOProperties,GetTOProperty的区别

上一篇 / 下一篇  2009-09-17 15:08:30 / 个人分类:QTP学习相关

GetToProperty:Returns the value of the specified property from the test object description.
GetTOProperties:Returns the collection of properties and values used to identify the object.
GetROProperty:Returns the current value of the test object property from the object in the application.
举个例子:
假设在库中有一个对象"窗口A",用于识别该对象的属性有2个,
一个属性是"text",在库中记录的值是"QQQQ".
另一个属性是"name",记录的值是"MM"
在实际运行脚本时属性"text"的值是"PPPP"而不是"QQQQ"
那么:
Window("窗口A").GetToProperty("text")返回的是:"QQQQ"
Window("窗口A").GetRoProperty("text")返回的是:"PPPP"
Window("窗口A").GetToProperties("text")返回的是用于识别"窗口A"的两个属性和值的集合


TAG:

 

评分:0

我来说两句

Open Toolbar