标题: QTP报错:General run error,about ChildObjects? [打印本页] 作者: 2005lmcctv 时间: 2012-2-19 20:42 标题: QTP报错:General run error,about ChildObjects? SystemUtil.Run "http://www.baidu.com/gaoji/advanced.html"
Set all_edit= Description.Create
all_edit("micClass").value = "WebEdit"
Set all_edits = Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects(all_edit)
'这里得到的错误代码是-2147467259
'x = GetLastError
'错误的提示信息是未指定的错误。
'msgbox(DescribeResult(x))
For i=0 To all_edits.count-1
msgbox (i)
Set oEdit = all_edits.item(i)
oEdit.set "QTP"
Next
Set oEdit =nothing
Set all_edits =nothing
Set all_edit= nothing
***********************************************************
按照书上敲的例子,结果运行时出现以下错误信息,百思不得其解,郁闷:
General run error.
Line (5): "Set all_edits = Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects(all_edit)".