I'm sure there's lots wrong in here This code doesnt seem to work at all for me. QTP shows Runtime error - what am I doing wrong here? Please help.
Object doesnt support this property or method: ExistsAndDisabled Browser("IPSDK WEB GUI (Search)").Page("Customer Info").Frame("Quote Header").Table("Quote_Header_Table").WebEdit("Quote_RefId")
My code for one webedit field :
------------------------------
Object doesnt support this property or method: ExistsAndDisabled Browser("IPSDK WEB GUI (Search)").Page("Customer Info").Frame("Quote Header").Table("Quote_Header_Table").WebEdit("Quote_RefId")
My code for one webedit field :
------------------------------
Code:
Dim QuoteName
Set QuoteName = Browser("IPSDK WEB GUI (Search)").Page("Customer Info").Frame("Quote Header").Table("Quote_Header_Table").WebEdit("Quote_Name")
If ExistsAndDisabled(QuoteName) Then
Reporter.ReportEvent micPass, "Checking Object Status", QuoteName.GetTOProperty("html id") & " was found and disabled."
Else
Reporter.ReportEvent micFail, "Checking Object Status", QuoteName.GetTOProperty("html id") & " was either not found or disabled."
Quote_Name=QuoteName.GetROproperty("value")
Quote_Name_value = DataTable.Value("Quote_Name", GLOBAL)
CheckValue Quote_Name, Quote_Name_value
End If
Public Function ExistsAndDisabled(test_object)
ExistsAndEnabled=True
If test_object.Exist() Then
If test_object.GetROProperty("enabled")=1 Then
ExistsAndEnabled=False
End If
Else
ExistsAndEnabled=True
End If
End Function
Public Function CheckValue(str1, str2)
If strcomp (str1, str2) =0 Then
Reporter.ReportEvent micPass, "Checking object value", str1 & "was found"
End If
End Function