Vbscript UFT在使用描述性编程时给出错误

Vbscript UFT在使用描述性编程时给出错误,vbscript,qtp,hp-uft,Vbscript,Qtp,Hp Uft,我的脚本工作正常,但当我使用函数和描述性编程时,它给我的结果失败,没有任何正确的结果 附加错误屏幕截图: 脚本 systemutil.Run "www.tokri.com/siteadmin" executefile "C:\Users\tusha\Documents\Automation\Automation\Function_library\Tokri_Function\tokri_class.qfl" Set oh = new tokri oh.tokri_webedit("Tok

我的脚本工作正常,但当我使用函数和描述性编程时,它给我的结果失败,没有任何正确的结果

附加错误屏幕截图:

脚本

systemutil.Run "www.tokri.com/siteadmin"

executefile "C:\Users\tusha\Documents\Automation\Automation\Function_library\Tokri_Function\tokri_class.qfl"

Set oh = new tokri

oh.tokri_webedit("Tokri Login" , "username" , "xyz")
功能

Class tokri
    'WebEdit Function
    Function tokri_webedit(br,we,v)
        If Browser("title := "&br).Page("title:="&br).WebEdit("name:="&we).Exist Then
            Browser("title := "&br).Page("title:="&br).WebEdit("name:="&we).Set v
            reporter.ReportEvent micPass , "Success", "Data Entry Successfull"
        else
            reporter.ReportEvent micFail , "Fail" , "Object Identification Unsuccessfull"
        End If
        tokri_webedit = "Data Entered Successfully In Textbox"
    End Function
End Class

设置oh=新tokri。。我没法得到那个。。你能解释一下吗。如果您不想创建对象。您可以使用set oh=description.create。如果要创建对象,请至少定义该对象的某些属性。如果没有属性,qtp将无法识别对象,您将得到错误。您无法在操作中创建类对象,您必须在类中创建类对象并返回它。请参阅此链接。请在库文件中尝试此选项。函数oh set oh=新的Tokri End函数,然后在测试中为oh设置对象,如“set abc=oh”