使用 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"
浙公网安备 33010602011771号