Does anyone know how to adjust the default timer for the WaitForImage function? The default is 30 seconds and I need to adjust for a long running process.
Thank you in advance.
Answer by Pablo G. ·
For developing purposes you can use, for example: WaitTime = 90
However, when putting a script into production you should use the Synthetic Monitoring Console and adjust the time thresholds in the "Configure Transactions" section. Change the "Availability Threshold" to be the maximum wait time for that transaction to complete.
More information for this can be found here: Configure An Active Transaction
Answer by Erick Z. ·
WaitTime = 60
will affect all the wait functions. I use this only for Development after my script is ready for production I can override the waittime per transaction.
Note that this will affect all your script from the moment you apply it.
let me know if this helps,
Answer by Yuriy L. ·
It is, of course, OK to create your own functions based upon the Framework functions, like Thiago suggests. But in this case the new function should not be in one of the Framework's modules or shared modules side-by-side with the Framework functions. It can either be placed into CVFW_User_Modifiable_Functions module, or a new module or shared module for such functions should be created by the user, or the user can even create their own project. Placing the functin into the Framework's module will result in problems with updating the Framework as a part of an upgrade process once you move to a newer release or service pack.
Please also realize that all future maintenence of such function is your resposibility.
Answer by Yuriy L. ·
In addition to the advices from Eric and Pablo, you can also benefit from reviewing an earlier discussion at https://answers.dynatrace.com/questions/121721/issues-in-waittime.html.
To briefly summarize, you can configure the Recorder to have a different default for WaitTime. you can set WaitTime wherever you need in the script. In production mode WaitTime inside a transaction has no effect, you need to configure the transaction, see Pablo's comment. Also please take into account that if you use several wait functions within the same transaction (say, after the action that initiates transaction, something should first appear, and then disappear, e.g. you need to measure time for copying a file) the wait time for the subsequent wait function is the remainder of what has been already used by previous wait functions of the same transaction.
Finally WaitForImage is one of wait functions and is not treated differently then others, say, WaitForText.
Hope this helps.