直接报错: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作者: maomao121 时间: 2010-12-24 09:22
I had similiar problem before. I added a WAIT before clicking the LINK object. The fault was then solved. Not sure whether it is useful for your case.作者: ZhuCrystal 时间: 2010-12-24 09:51 回复 2#maomao121
THS,I To Try!作者: ZhuCrystal 时间: 2010-12-24 15:18
THS,The problem settled!
Your method is very useful!