Quantcast
Channel: Silk Test Knowledge Base
Viewing all articles
Browse latest Browse all 105

Synchronisation methods in Silk Test

$
0
0
Current Revision posted to Silk Test Knowledge Base by DaiG on 4/12/2016 3:45:03 PM

In this case, we are discussing

Object enabled timeout
Object resolve timeout
Synchronisation timeout

These settings are found under Tools | Options | Playback | Timing.

Q1. Are these timings applicable to both Visual Tests and dotNet scripts?
A1. Yes.

Q2. Do any of these timings overlap i.e. do they start at the same time?
A2. The timings do not overlap. For example, take the following Silk Test script actions:-

Dim window = _desktop.Window("//Window[@caption='My Window'") window.Click(10,50)

Silk Test performs the following synchronisation operations:

1. 'Object resolve timeout' is started as Silk Test looks for the object described by the locator.
2. When the object is found, the 'Synchonisation Timeout' is started as Silk Test waits until the application is ready.
3. Silk Test then checks to see if the control is enabled i.e. ready for use. If not, 'Object enabled timeout' is started.
4. If all three of the above checks and timeouts pass, Silk Test moves to the next line and executes the Click() action.
5. After executing the Click() action Silk Test waits until the application is ready again.

Q3. What is the option 'Ensure object is active' under Playback General section and  when can  it be  used?
A3.'Ensure object is active' does not actually perform any synchronization. If the option is enabled (by default it is disabled), Silk Test just  makes sure that the window that contains the  control is active. However, most of  the time this is not needed because the application is typically active anyway (unless the user intentionally puts the application to the background during playback by bringing another application to the foreground).

Q4. Do these synchronisation methods apply to both hard-coded locators and Object Map identifiers?
A4. Yes

Best practices for making use of these methods:

If your script fails with 'random' ObjectNotFoundExceptions then increasing the 'Object resolve timeout' (e.g to 30 seconds) will help. For very specific long running operations (e.g. a click performs a long mathematical calculation and shows a progress dialog) we recommend using the 'WaitForObject' or 'WaitForProperty' method. Alternatively you can write the script so that it waits until the a certain object disappears (e.g the progress dialog) by using the 'WaitForDisappearance method'.

The 'Application ready timeout' is the timeout that the  base state uses after starting the application under test. Silk  Test tries  to find the application main window defined by the locator as part of the base state within that time. This is a separate option because 'Synchronization timeout' only applies to actions and 'Object Resolve Timeout' would typically be too short if the application startup takes some time.

[Information originally provided by Michael Gehmeyer in a forum post].

Tags: synchronisation timeout, synchronization timeout, Synchronization, object resolve timeout, object enabled timeout, synchronisation

Viewing all articles
Browse latest Browse all 105


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>