Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing Object to Function
#2
Solved: 6 Years, 3 Months, 3 Weeks ago Wink 
This solution is working - worked it out myself.

Code:
'Wait for save to finish

WaitForSave(Browser("PDCS").Page("A").WebElement("Popup"))

Function WaitForSave(theObj)
timeSpent = 0
waitTimeOut = 20
Set tempObj = theObj 'example: (Browser("PDCS").Page("A").WebElement("Popup"))
Do While tempObj.Exist(0)
  If timespent = waitTimeOut Then
   Reporter.ReportEvent micFail, "Wait for Save", "Waiting for save to finalise and has not completed in " & timeSpent & " seconds. Need to check why it has not saved. Test will stop"
         ExitTest
     Else
      Wait 1
    timeSpent = timeSpent + 1
  End If
Loop
End Function
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,293 07-28-2009, 03:01 PM
Last Post: manabh

Forum Jump:


Users browsing this thread: 3 Guest(s)