Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error on Passing Object between functions
#1
Not Solved
HI All,

I am trying to write a reusable action for verifying weather obect exist or not but I am getting "Object does not support this Property or Method obj.Exist" Sad

Code:
Set objxyzWin = SwfWindow("xyz")
IsMainWindowExist = WaitforObjExist(objxyzWin)
If  IsMainWindowExist = False Then
     Reporter.ReportEvent micFail,"xyz Main Window Exist","Unable to find  Main Window"
     ExitAction
End If

Reusable Action
Public Function WaitforObjExist(obj)

   temp = 1
   IsExist = False
      Do while temp < 30
        obj.Exist
        Wait(10)
   Loop
   If  temp < 30 Then
        IsExist = True
   End If
   WaitforObjExist = IsExist
End Function

Please help me on this
Reply
#2
Not Solved
Obj.Exist will return a true or false value. I am not sure why you are using it here
Do while temp < 30
obj.Exist
Wait(10)

??????
The error is expected.
Reply
#3
Not Solved
Since I want to wait for about 300 sec insted of Hard coding I am using like this.
Error is only for using Infragestics controls, For the normal Web Objects or Win Objects it is woking fine
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in Code while accessing WPF object Dinesh_cts 1 3,165 11-08-2017, 11:46 PM
Last Post: lotos
  Error while adding Object to Object repository at run time SaranKumarV 3 8,393 02-02-2015, 01:40 AM
Last Post: dubeyvin
  UFT 11.5 throwing unspecified error while running for Delphi object rakeshsahay 0 3,518 12-25-2013, 10:43 AM
Last Post: rakeshsahay
  QTP "Can't recognize object" error Ansh123 3 3,265 12-28-2011, 02:59 PM
Last Post: sshukla12
  Best Practices in Passing Data to Tests sean.graham@dcsg.com 1 2,450 08-11-2010, 10:17 AM
Last Post: QTPLearn

Forum Jump:


Users browsing this thread: 1 Guest(s)