Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check existence of web objects on page
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
I'm sure there's lots wrong in here Tongue 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 :
------------------------------

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
Reply


Messages In This Thread
Check existence of web objects on page - by eltee - 03-16-2011, 02:43 PM
RE: Check existence of web objects on page - by eltee - 03-16-2011, 02:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Smile If Then Is Always True For Web Objects zunebuggy 1 932 04-17-2020, 04:30 AM
Last Post: zunebuggy
  click each web link in a page using Index or other method in QTP smeijer 13 24,678 04-29-2017, 04:53 PM
Last Post: kowshik
  VB Script to count number of links in a web page. Suma Parimal 4 25,257 07-01-2015, 12:59 PM
Last Post: govind
  How to connect two web element objects? zawarepradeep@gmail.com 1 2,638 07-23-2014, 11:23 PM
Last Post: Ankur
  Spy is not deteting Web objects ssandula 0 1,915 11-25-2013, 04:33 PM
Last Post: ssandula

Forum Jump:


Users browsing this thread: 2 Guest(s)