|
录制QTP脚本时,有一下拉菜单无法被识别,鼠标放到主菜单名称的位置(主菜单名为“首页”),则出现下拉菜单,移开,下拉菜单消失。
设置修改了QTP的mouseover和mouseout事件为Enabled
查看html程序,触发该下拉菜单的一段语句:
<TD onmouseup="cmItemMouseUp (this,1,null,0,0)" class=ThemeOfficeMainItem onmousedown="cmItemMouseDown (this,1,null,0,0)" onmouseover="cmItemMouseOverOpenSub (this,1,null,0,0)" onmouseout="cmItemMouseOut (this,1,null,0,0)"><SPAN class=ThemeOfficeMainItemLeft> </SPAN><SPAN class=ThemeOfficeMainItemText>首页</SPAN><SPAN class=ThemeOfficeMainItemRight> </SPAN></TD>
已在对象库中增加名为“首页”的对象,类型为WebElement.专家视图中增加如下语句:
Browser().Page().Frame().WebElement("首页").FireEvent "onmouseover"
但执行时,仍出现如下错误:
Cannot identify the object "首页" (of class WebElement). Verify that this object's properties match an object currently displayed in your application.
-------------
向各位高人学习!谢谢! |
|