Waits for the specified cursor to appear and returns the elapsed time.
nSeconds = Cursor.Wait (Cursor, nTimeout [, nNoChange])
|nSeconds||The length of time (in seconds) it took for the cursor to become the current cursor. NUMBER.|
|Cursor||The name of the cursor to wait for. CURSOR.|
|nTimeout||The interval to wait for the cursor to change before raising an exception. NUMBER.|
|nNoChange||Optional. The number of seconds that the cursor must remain unchanged. NUMBER.|
You use Wait to synchronize a script on the current cursor or to measure performance.
Wait returns the length of time that it took for the cursor to become the current cursor. If Cursor is an empty string (""), Wait returns the time it took the current cursor to change to any other cursor.
nTimeout is the length of time (in seconds or fractions of seconds) to wait for Cursor to become the specified cursor before raising an exception. You must specify a value for nTimeout.
If you specify nNoChange, Wait will raise an exception if Cursor does not remain the current cursor for at least nNoChange seconds within the total time-out period specified by nTimeout. This behavior is useful if the cursor keeps changing and you want to make sure it has stabilized. nNoChange should always be smaller than nTimeout.
You can call GetType to get the cursor name that Wait requires as an input argument, or to wait for one of the standard cursors, you can specify the name yourself. Valid cursor names are "POINTER," "INSERT," "DELAY," or any other identifier (an INTEGER encoded as a string) returned by GetType.
If the timeout period expires before the cursor reaches the appropriate state, Silk Test Classic raises the exception E_CURSOR_TIMEOUT.
TextEditor.Start () // wait up to 3 seconds for the pointer cursor Cursor.Wait ("POINTER", 3)