From Seapine Labs
QA Wizard Pro’s Text View allows you to create more complex and flexible scripts than is possible with Grid View. In Text View, you have direct access to the scripting language and code. You can create and edit statements, modify scripts, and add advanced logic to scripts.
You may want to work in Text View if you have experience working with VBScript-like statements and have some programming knowledge. If you are new to QA Wizard Pro, you may want to use Text View as you become more familiar with the program. Many testers find that they can work faster and more efficiently in Text View.
[edit] Differences between Text View and Grid View
You can record and modify scripts in Grid View or Text View. The main difference between the views? You can manually type statements in Text View and use programming techniques to create more advanced scripts.
Before you get started with Text View, you need to understand some of the similarities and differences between the views.
- In Grid View, scripts are displayed in a table and each statement is displayed in a row.
- In Text View, scripts are displayed in a code editor and each statement is displayed on a line.
- Script step numbers are the same in Grid View and Text View.
- You can add and edit statements in Grid View and Text View. You can use the statement editor, which is available from the Script menu, to add and edit statements in both views. You can manually type statements in Text View.
- The following statements are only available in Text View. They can be added manually or through code completion.
- ArrayClear
- BoundaryChecks
- ExternalCall
- LoadExternalAssembly
- NextRow
- ParseString
- PrevRow
- RunScriptRemote
- SetCell
- SetScriptVariable
- SRand
- You cannot switch between Grid View and Text View until any syntax errors, which are displayed in the Errors window, are resolved.
- The Preview pane is automatically updated in Grid View only.
[edit] Understanding script syntax
QA Wizard Pro’s scripting language is based on Visual Basic with some of the conveniences of VBScript. Each statement has its own syntax rules. If you do not follow these rules, errors will be generated when you run the script.
- When you enter a text string, you must add double quotation marks (“TextString”) before and after it.
- When you enter a variable or numeric value, do not use any quotation marks.
- You can add extra blank spaces to a script to improve readability. For instance, it may be easier to read x = 10 than x=10.
- Each statement must be on one line.
- Keywords, such as constants or strings, are displayed in different colors to help with script readability.
[edit] Using code completion
Text View’s code completion feature displays the available statements or actions as you type.
- Type an equal sign (=) to display a list of functions, such as ArraySize or Trim, that return a value. Scroll through the list to select the function you want to use. These statements are not supported in the statement editor.
- Press the spacebar key at the beginning of a line to display a list of procedures, such as CaptureScreenshot or NextRow, that do not return a value. Scroll through the list and click the procedure you want to use. The statement editor supports many of these statements.
- Type a period (.) after a window or control to display a corresponding list of actions or objects. The items in this list changed based on the selected window or control. Scroll through the list to select the action or object you want to use.