A、Automation-Run from Step B、Debug-Step Into
C、Debug-Run to Step D、Debug-Debug from Step
简答题:
5、请解释Test Object和Run-Time Object之间的区别,两者如何应用
Run-time Object展现的是运行时本地测试对象的属性或方法。在脚本中可以通过Object属性来访问和获取Run-time Object的属性或执行其方法。例如:
Dim MyDay Set MyDay=Browser("index").Page("Untitled").ActiveX("MSCAL.Calendar.7").Object.Day
下面的脚本则通过Object属性执行测试对象的某个方法:
Dim MyWebEdit Set MyWebEdit=Browser("Mercury Tours").Page("Mercury Tours").WebEdit("username").Object MyWebEdit.focus
而对于Test Object则可通过GetTOProperty 和 SetTOProperty 来获取或设置测试对象的属性值。例如:
Browser("QA Home Page").Page("QA Home Page").WebButton("Submit").SetTOProperty "Name", "my button"
ButtonName=Browser("QA Home Page").Page("QA Home Page").WebButton("Submit").GetTOProperty("Name")
下面的脚本通过GetROProperty访问测试对象当前的属性值:
link_href = Browser("Mercury Technologies").Page("Mercury Technologies").Link("Jobs").GetROProperty("href")