RVL Editor

rvl editor

Purpose

Rapise Visual Language Editor

How to Open

Use the RVL button on the main toolbar to open an RVL (.rvl.xlsx) file. The file will be opened by the RVL Editor in the Content View.

Features

Editor has support for all RVL statements including

statements.

RVL is a recordable language. Rapise recorder is translates captured actions to objects stored in the object repository and a set of actions. Each recorded chunk may be inserted into desired place in the selected sheet:

Recording

Usually recording is with together with scripting and, maybe, some JavaScript for advanced tasks.

RVL Scripting

In addition to recording one may use RVL editor for authoring scripts. You may drag&drop actions from the Object Tree into the RVL. Also RVL editor is both keyboard and mouse friendly. You may either type whole or parts of commands and rely on auto-completion OR simply select a dropdown in each cell of the row.

When writing or modifying a script it is recommended to go left-to-right for script creation.

Auto Completion

RVL Editor supports Auto completions. For example, if you type I in the flow column:

Flow I

And hit Tab key the whole If statement is created:

Flow If

Note: Tab is a trigger for auto-completion. If you use cursor keys or mouse to leave the cell then auto completion will not be executed.

If you go to last line and change End with ElseIf

Flow If

then alternative branch is appended:

Flow If

Similar logic works for Params, Conditions, Maps, Loops, Assertions and so on.

Disabling Cell Auto Correction

Sometimes autocompletion prevents one from entering a desired value. For example, you have a global object navigator and typing it into the Object columns automatically changes it to Navigator.

The solution is to enter the cell for editing text and pressing F2. It will disable all autocompletion for this cell and then you may type any value.

Action Params

When you select an action from the list RVL Edtior automatically fills default action params. For example, if we choose:

DoLaunch

And press Tab after DoLaunch RVL Editor fills default param:

DoLaunch

DoLaunch has one required parameter cmdLine. Also it has a number of optional parameters. They are not added by default to make script more concise. However, you may need all or some of them. So you may add them by pressing Params button on RVL Toolbar:

DoLaunch

It is also possible to add params one-by-one using the dropdown in the ParamName column:

DoLaunch

Password Param Value

Once column ParamType set to password, ParamValue should be an encrypted string. Setting encrypted value is simple:

  1. Change ParamType to string.

  2. Type plain value to be encrypted into ParamValue.

  3. Switch ParamType to password - plain value becomes encrypted.

Param Dropdowns

It is possible to define own list of dropdown values for any parameter. In most cases it is defined for custom functions.

For example, we may have function SetState(stateCode) where we expect pre-defined limited set of state code values.

function SetState(/**string*/stateName)

We may define dropdown for stateName parameter, so that RVL editor suggest the following list:

States

The values for this dropdown are defined in the spreadsheet:

States

Moreover, we define a code for each state name, so it may be re-mapped in the implementation of the SetState function using

States

Dropdown values are defined in file Dropdowns.xlsx, that may be added to the test using theCreate/Spreadsheet... menu item.

The full key to find matching dropdown is objectid.method.paramName. If not found, it will check method.paramNam and paramName columns:

Key Example
objectid.method.paramName Global.DoLaunch.cmdLine
Functions.SetState.stateName
MyButton.DoClick.clickType
object_type.method.paramName VSFlexGrid.DoClickCell.row
method.paramName SetState.stateName
paramName stateName

The dropdown may be defined in the current (next to Main.rvl.xlsx), in parent test and so on up to the framework root (the folder pointed by the %WORKDIR%).

States

RVL Editor always tries to find best match for dropdown column starting from nearest Dropdowns.xlsx and climbing up to the framework root.

Dropdowns may also be mapped to other values. I.e. human-readable menu area names to learned object IDs, state names to state codes, element names to XPath statements and so on. This mapping is done by adjacent columns in Dropdowns.xlsx. The mapping may be one to many, so we may define both state code, state order number, state capital for the same state name by adding corresponding columns.

Full Line Comments

Anything typed into the Type cell of the commented line is expanded to as many cells as needed to show the text. This is similar to the way Excel extends cell text across sibling empty cells:

DoLaunch

Context Menu

RVL Context Menu

Sheet Tab Context Menu

Tab Context Menu

Functions Object

Suppose we have some functions defined in the User.js file:

User functions

Calling JavaScript from RVL is done via the Functions Object. It is not available in the object repository and is only shown in RVL Objects dropdown:

User functions

Once selected it shows all user defined functions from the User.js file:

User functions

File Extensions

RVL has following file extensions:

RVL is designed to be a simple grid language and it may be edited in any spreadsheet editor supporting .xls or .xlsx files (i.e. Microsoft Excel)

See Also