Edit Menu

The Edit menu is available when you have a file, for example an include file, open.

Command (Shortcut)
Undo (Ctrl+Z)
Backs out of the most recent change you have made in the editor. When you make a change in the editor, the Undo menu item describes the action. For example, if you had just cut some text, the menu item would read Undo Cut. When you select Edit > Undo, the editing action is undone and changes the Redo menu item to describe the undone action. For example Redo Cut. To reverse the undo you just did, click Edit > Redo.
Redo (Ctrl+Y)
Reverses the undo you just accomplished through Edit > Undo. The Redo menu item describes the undo. For example, after undoing a cutting action, the Redo menu item becomes Redo Cut. When you select Edit > Redo, the action is performed again.
Cut (Ctrl+X)
Removes the selected text from the active window and copies it to the clipboard.
Copy (Ctrl+C)
Copies the selected text to the clipboard.
Paste (Ctrl+V)
Inserts text that you have cut or copied to the clipboard into the active window at the current insertion point. You cannot paste graphics into a window.
Delete (Del)
Removes the selected text. Unlike Cut, Delete does not copy text to the clipboard.
Find (Ctrl+F)
Opens the Find dialog box where you can search in the active window for a text string. For additional information, see Searching for a String in a File.
Find Next (F3)
Repeats the last find or replace operation. This menu item changes to Replace Next after a replace operation, or to Replace All after a global replace operation.
Replace (Ctrl+R)
Find and replace a string in a file with another string. For additional information, see Replacing a String in a File.
Go to Line (Ctrl+G)
Opens the Go to Line dialog box, which enables you to go to a specific line in the active file. Type the number of the line that you want to go to into the Line number field and click OK.
Go to Definition (F12)

Available only with a compiled file such as those shipped with Silk Test Classic or those listed in the Use files field of the Runtime Options dialog. Goes to the declaration for a method, function, variable, constant, or data type when you click on a reference to such an item in your 4Test code and then do one of the following:

  • Press F12.
  • Click Edit > Go to Definition.
  • Press Ctrl+.

For example, in the following 4Test code:

String GetHelloWorld()  
return "Hello World" 
String sHelloWorld = GetHelloWorld()

If you place the cursor somewhere on the reference to GetHelloWorld() on the last line, and press F12, the cursor is placed at the front of the line String GetHelloWorld()(You are prompted to save). The file opens with the correct declaration if the file is not currently open.

Find Error (F4)

Is available in the active error window or results window. How this command works depends on the type of window that is active:

  • If an error window is active, the scan is downward from the cursor position until it finds a line referring to a script file. It looks for that file among open editor windows (or opens it if it is not found) and places the cursor on the appropriate line of the script.
  • If a script window is active, the cursor is placed on the appropriate line of the script.
  • If a results window is active, the cursor is positioned on the next error message or warning in the results window.

To step through each source line that contains an error, make the errors window or script window active and press F4. The relevant error message displays on the status line.

To cycle through each error message or warning in a results file, make the results window active and press F4. The cursor is positioned at the next error message or warning in the results window.

By default, Find Error finds both errors and warnings. If you want to skip over warnings, clear the Find Error Stops at Warning check box in the Runtime Options dialog box.

Data Driven
This sub-menu is available when you are in a script with data-driven test cases. There are four commands available.
Command Description
Find/Replace Values Find and replace values in a data-driven test case with links to values in tables and columns. For additional information, see Finding and Replacing Values.
Goto Testcase Displays the Goto Testcase dialog box.
Validate Replacements Toggles the checking that the application does to ensure you are only finding and replacing whole values. The default is checked. To switch between these modes, click Edit > Validate Replacements to select or clear the check mark.
Reload Database Refreshes the link to the data source and reloads the tables and columns from that data source. This is useful if the data source has had any additions or changes since you first opened the .g.t file.
Find Next Difference

Available only when the Difference Viewer is the active window. Finds the next discrepancy between an actual and expected value.