Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing Object to Function
#1
Solved: 6 Years, 3 Months, 3 Weeks ago
I need to pass an object to a function and wait until it no longer exists - as it is not saved until the popup has disappeared.
I need to set a time out for the popup displaying to stop looking after a certain time
This is required on many different panels / popup, so I want the same code to work just based on a same browser, different page, different heading on popup

I have tried the following but it does not reset the .exist line, so the value never changes to false
Code:
Function waitToBeSaved(strObject) – being Browser(BrowserName).Page(PageName). object (popup header)

Dim strObject                           'to hold page object description
Dim intCounter                         'to store loop counter value
Dim strFinished                             'to store page existence value

intCounter = 0
strFinished = strObject.Exist
Do While  (intCounter <10) OR (strFinished = True)
             strFinished = strObject.Exist(1)
             intCounter = intCounter+1
Loop
If intCounter = 10 Then
      Reporter.ReportEvent micFail........
      Exit Test
End If
End Function

This works fine outside of the function
Do I need to Set the object??
Reply


Messages In This Thread
Passing Object to Function - by Mozza - 07-30-2018, 05:37 AM
RE: Passing Object to Function - by Mozza - 07-31-2018, 04:50 AM
RE: Passing Object to Function - by Mozza - 08-02-2018, 03:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,966 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  Passing objects to Functions vinod.nhce 0 3,291 03-13-2014, 06:09 PM
Last Post: vinod.nhce
  How to make a function for an object that has a large number of parent objects Shroomsday 1 2,396 01-28-2014, 11:15 PM
Last Post: jacosta
  How can I fetch server time using function Now or any other function? blanchedsouza 2 5,104 11-07-2009, 08:34 PM
Last Post: Ankur
  Passing the object list as the argument arun2kindia 1 2,291 07-28-2009, 03:01 PM
Last Post: manabh

Forum Jump:


Users browsing this thread: 1 Guest(s)