When server is loading data and opening a new window. For example, when user submit a request a confirmation messages appears with an OK button. The step in VisualTest requires to click on OK button, but this button takes much time to appear, so PlayBack display a debug error because this button doesn´t exist yet.
One possible solution is to insert a Delay, but this is not the best solution. Other solution is to check a possible value that appear for example “Loading”, but we have the problem when this value disappear because window was already loaded, and VisualTest don´t know were “Loading” value is.
I would like to know if there is any solution that tell us if the window as allready loaded in order to wait till all data is loaded.
For Visual Tests you could try and go to “Tools | Options | Play Back |Timing” and increase the time out for “Object resolve timeout” or “Object enabled timeout” to see if this would help your scenario. However if it does not then I would recommend that you consider looking at the Exists() and WaitForObject() methods in SilkTest; which will allow you to specify a time period to wait for when a particular object is available.
These methods are only available via the SilkTest VB.NET scripts, however you could create a VB.NET test script which will perform the wait or check the existence of the object and then you can call this script from your Visual Test.
The following KB articles below discuss how this can be done.
I think there is no direct way to find out loading period.
Try to use
WaitForProperty (propertyName, propertyValue, [timeout]) method
instead of wait method.
Set property Name and value and try to set timeout value as large as possible.
Once the property value will match it will execute next line of code it will not wait till timeout period.