博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

使用description对象

Posted on 2009-03-24 16:42  Testing of S小调  阅读(158)  评论(0)    收藏  举报

使用 Description 对象可以返回包含一组 Property 对象的 Properties 集合对象。Property 对象由属性名和值组成。然后,可以在语句中指定用返回的 Properties 集合代替对象名。(每个 property 对象都包含一个属性名和值)。

 

要创建 Properties 集合,可以使用以下语法输入 Description.Create 语句:

Set MyDescription = Description.Create()

 

比如要在username编辑框中输入”MyName”,可以这样写:

set EditDesc = Description.Create()

EditDesc("Name").Value = "userName"

EditDesc("Index").Value = "0"

Browser("Welcome: Mercury").Page("Welcome: Mercury").WebEdit(EditDesc).Set "MyName"