51Testing软件测试论坛

标题: QTP保存失败报错 [打印本页]

作者: shiegg    时间: 2011-6-21 16:31
标题: QTP保存失败报错
本帖最后由 shiegg 于 2011-6-21 16:35 编辑

在添加某些代码的时候 如
Set desc=Description.Create
      
desc("class").value="cursor_hand dept"

      
set WebNodObj=Browser("Creationtime:=0").Page("index:=0").ChildObjects(desc)
               
n=WebNodObj.count
   

      
For i=0 to n-1
             
          set t=WebNodObj(i).object
         
'  msgbox DescribeResult(Err.Number)
               
Objtitle=t.title
               
'msgbox   Objtitle
                   
If   Objtitle=DepName Then
                     
         Actual="新建成功"
                                         
         Exit For
                          
         else
                                
         Actual="新建失败"
                  
          End If
     
          Next
   
End If


点击保存会报错
This operation cannot be performed.For further help please contact support

删除代码就可以成功保存




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2