|
我在回放相关脚本时,QTP直接提示,无法找到Link对象;详细信息如下。请各位高手指点下,感激不尽!先行谢过了!
直接报错:Cannot find the "[ Link ]" object's parent "[ Browser ]" (class Browser). Verify that parent properties match an object currently displayed in your application.
Line (38): "Browser("title:=Retech LMS2.0","name:=Retech LMS2.0").Page("titile:=问卷库管理","url:=http://192.168.4.5:9999/Survey/SurveyExampaper.aspx").Link("text:=问卷库管理").Click".
这是我试过的几种方法,都没有解决此问题:
(1)通过GetROProperty读取属性Text,赋予变量paly来定位;
'play=Browser("title:=Retech LMS2.0","name:=Retech LMS2.0").Page("titile:=问卷库管理","name:=问卷库管理").Link("text:=问卷库管理").GetROProperty("text")
'Browser("title:=Retech LMS2.0","name:=Retech LMS2.0").Page("titile:=问卷库管理").Link("text:="&play).Click
(2)修改对象库中对应的描述属性(去掉text,添加url);
Browser("title:=Retech LMS2.0","name:=Retech LMS2.0").Page("titile:=问卷库管理").Link("url:=javascript:__doPostBack('ctl00$ContentPlaceHolder1$Button1','')","html id:=ctl00_ContentPlaceHolder1_Button1","html tag:=A").Click |
|