How do you synchronization point through DP?

Questions by Richi   answers by Richi

Showing Answers 1 - 6 of 6 Answers

AdvancedQTP

  • Nov 13th, 2007
 

You'll need to implement it yourself, as opposed to using the built in native QTP mechanism. The code structure I use is:

iTimer = Timer ‘Get the current time

DoTriggerEvent ‘E.g. : click a button, submit a form, close a window, etc.

Do

   ‘Inner code to deal with anomalies.

Loop until (Timer-iTimer>30) Or (AnotherExitCondition=True)

‘Here we wait 30 seconds before exiting the loop

If Timer-iTimer>30 Then

   ‘Code to deal with TimeOut

Else

   ‘more code to deal with different exit conditions

End if
 





For Example:

iTimer = Timer ‘Get the current time

iTimeOut = 30 ‘How Long To Wait

VBWindow("Window").VBButton("Button").Click

 

Do

   If VBWindow("Window").Dialog("SystemBussy").Exist Then

      iTimeOut = 90 ‘Longer time-out

      iTimer = Timer ‘Reset timer

      VBWindow("Window").Dialog("SystemBussy").Type MicReturn

   End If

Loop until (Timer-iTimer>30) Or (VBWindow("Window").Dialog("Success").Exist)

You can read more about these code structures here: http://www.advancedqtp.com/knowladge-base/code-techniques/custom-checkpoints/

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions