标题: Cannot find the object's parent 错误 [打印本页] 作者: datouniuniu 时间: 2011-8-10 14:22 标题: Cannot find the object's parent 错误 我在QTP上用描述性编程编写了下面的代码
systemutil.Run "c:/program files/internet
explorer/iexplore.exe","http://www.baidu.com"
Set oBrowser=description.Create
Set oPage=description.Create
Set oEdit=description.Create
oBrowser("micclass").value="Browser"
oPage("micclass").value="Page"
oEdit("name").value="wd"
Browser(oBrowser).Page(oPage).WebEdit(oEdit).Set "helloworld"
在运行最后一行脚本时,系统报错:
Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify that parent properties match an object currently displayed in your application.
Line (8): "Browser(oBrowser).Page(oPage).WebEdit(oEdit).Set "helloworld"".
Tip: If the objects in your application have changed, the Maintenance Run Mode can
help you identify and update your steps and/or the objects in your repository.