Rapise Visual Language (RVL)

Articles
Rapise 8.0: how to use Page Objects/Modules

When writing automated tests, it is often necessary to create shared modules that can be used by multiple test cases. These modules serve various purposes, such as handling authentication for applications with a login page, performing necessary actions after test case completion, or working with custom controls within the application, such as dropdown menus, form fields, or grid/table controls.

In Rapise 8.0, you have the ability to address all these requirements. Rapise supports two types of modules: RVL (Rapise Visual Language) and JavaScript-based modules. These modules provide a flexible and powerful approach to handle common functionalities across your test cases.

By using RVL modules, you can visually create reusable components that encapsulate specific actions or sequences of steps. For example, you can create an RVL module that handles the authentication process by entering credentials and clicking the login button. This module can then be easily reused across multiple test cases that require login functionality.

Alternatively, you can leverage JavaScript-based modules in Rapise 8.0. JavaScript is a versatile programming language that allows you to create custom functions and logic to handle complex scenarios. With JavaScript-based modules, you can implement specific interactions with custom controls or perform actions that are not easily achievable through the visual interface of Rapise.

Both RVL and JavaScript-based modules in Rapise provide a seamless way to organize and reuse common functionalities within your automated tests. They help improve maintainability, reduce duplication of code, and enhance overall test efficiency.

Dynamically Clicking on a Desktop App Button Sample (MS-Word)

We had a customer request for a sample that demonstrates how to click on buttons in a desktop application (in this case a plugin for Microsoft Word) where instead of having to learn each of the buttons individually, you can learn the button container and then loop through the buttons using a Rapise RVL Map.

Check if File is in the Downloads Folder

When you test scenario has some sort of download we may need to wait/verify for download to be done. Here we provide some functions designed to help in such cases.

Play All Sheets in RVL

Use many sheets in RVL? Want to execute them all at once without calling one-by-one. Here is a simple solution.

How to disable browser notifications for Selenium Chrome

Some of the Web resources used for automated tests have a browser's push notifications active.
However, push notifications creating unnecessary records in RVL table.

Reading DOM element runtime property

Sometimes we need to get runtime property for the element. For example, we need to get a background color to know that element is highlighted for a user. Anything configured via stylesheet is usually a property: color, font, margins, dimensions, visibility etc.

Get DOM element visible color

Sometimes we need to get runtime property for the element. For example, we need to get a background color to know that element is highlighted for a user. You may do it with help of Navigator.ExecJs.

Get DOM element visible color

Sometimes we need to get runtime property for the element. For example, we need to get a background color to know that element is highlighted for a user. You may do it with help of Navigator.ExecJs.

Using RVL Merge Utility

Sometimes we need to do Diff and Merge operations when working with external Source Control systems (git, svn, etc). This utility (ExcelMerge) will enable this functionality.

SoftAssert in Rapise

Sometimes you need more control on whether to stop execution when an assertion fails. Assertion that does not stop execution is Soft Assertion.  With soft assertions you may force it to fail later when all expected errors are collected or keep running until the very end.

Returning Values from RVL sheets

Sometimes you need to return a value or a set of values from RVL.DoPlaySheet or RVL.DoPlayScript calls. This sample shows you how.

Easy Way to Dump Sheet Variables

We sometimes need to dump diagnostic information to the report. It may be values of some or all local variables.

Merge Strings in RVL

Here we show a few examples on how to combine strings in RVL.

Customize Rapise Report Messages

Sometimes we need to override the message written to the report when some action is performed.
 

Using Extra Columns in RVL to control screenshots

Sometimes we need more fine-grained control over screenshots. Here we describe the way of using H column for defining which actions will have what kind of screenshot captured.

Handling Grouped Data in Rapise

Sometimes we need to process data in groups or even in hierarchical way. Here we will show how to make it using plain table and loop in RVL.

Reading values from .properties files in Rapise

.properties is a file format mainly used in Java related technologies to store the configurable values. Here we show how to work with it in Rapise.
 

Checking String Length in RVL

If you need to get the size of the string, then here is a couple of possible ways for doing it.

Referring Repository Objects from Maps

Sometimes you need to specify object and data for it in the map. Here we will show how to make it using Rapise built in maps and available APIs.

Passing Map as a Parameter into RVL Sheet

This topic covers more detailed description on how to pass map from one Sheet to another in RVL

Passing Sub-Test Parameters

Here we will cover several ways of passing parameters and returning values from Sub-Tests.

How to Do Mouse Wheel Scroll in Rapise

Some controls require mouse wheel input. Here is how to do it.

Comparing Parts of Images

Sometimes compared images partially differ due to some dynamic part. Here we show how to do partial comparison in this case.

Renaming Objects in Rapise

Good object naming is important for test script clarity and readability. Default names are detected during record/learn session and results sometimes are cumbersome, obscure or irrelevant. Here we show how to give proper names to objects.

How to Get All Links on the Page with Rapise

Sometimes you need to go through all links to check something. Here are two ways: JS and RVL of doing it with Rapise.

Using Extra Columns in RVL to add Report Attributes

You may use extra RVL columns for your own purposes. In the simple case for storing additional information (notes, links). In more advanced cases extra columns may affect script behavior: add report attributes, control screenshots, control custom actions, assign variable values etc. Here we provide live example of one of such use-cases.

Writing data to an Excel spreadsheet

In this article we describe how to write data to an external Excel spreadsheet during test playback. Both RVL and JavaScript examples are given.

DoClick() vs DoClick(x,y)

When doing mouse click from Rapise it is sometimes need to use offset coordinates. You will learn:

1. When explicit coordinates are needed

2. How to determine them

Sample Spira-Friendly Framework with Multiple RVLs and Common Library

Working example of test framework designed to maximize flexibility and get the most from Rapise productivity features.

Storing Values Across Test Cases and Sessions in Rapise

Sometimes test set requires a value passing through the sequence of test cases. Good example is User ID assigned during sign-in and then used in subsequent test cases.

Another use case is when test case requires some input value that should always be unique.

Data-driven testing with spreadsheets and RVL

Many test automation scenarios require performing same steps with different data. For example, login into application with different user credentials, or enter several lines of a sales order into a table. This is data-driven testing. From this article you will learn how to do this in Rapise Visual Language (RVL) and JavaScript modes.  You will also learn how to define data within a test and in external spreadsheet.

Converting Recorded Steps into Functions/Scenarios

You have recorded some basic test scripts in Rapise, and now you want to easily extract the steps into a reusable function that can be called from the main test script. This article explains how you can do this for both RVL and JavaScript based tests.

How to Do a Nested Loop with Rapise Visual Language (RVL)

Sometimes you want to have multiple nested loops to test a set of test data (for example loop over a list of users, and for each user, loop over a list of browsers). In JavaScript you can use standard nested loops, this article explains how you can do the same using RVL.

Compare two SpreadSheets in Rapise

Sometimes you need to compare two tables. Here we introduce a function to compare two spreadsheets.

Windows Scripting Host Crashes When Playing Back Rapise RVL Script after Windows 10 Update

Unfortunately, Windows10 has a nasty habit of frequently updating itself and then breaking existing applications. We found that the February 14th, 2018 Windows10 update corrupted the Excel device driver that Rapise uses to access the RVL test script spreadsheet during playback.

List Files from Folder in RVL

Sometimes it is required to have list of files from some folder. Here we demonstrate how to get this list and how to iterate through it in RVL.

Using RVL Loop to generate sequence of file names

We show how to do data generation for test scenario using RVL Variable loop in Rapise. This sample shows how to produce a sequence of filenames: FILE1.txt, FILE2.txt, FILE3.txt and so on.

Read external Excel spreadsheet in RVL

Attaching to external .XLS spreadsheet in RVL may be easily done in RVL by use of Range type of the Map.

Accessing DOM elements by Attributes in RVL

It is possible to access such objects form RVL using one of the methods shown in this article.

Using Object ID as RVL ParamValue

Sometimes Object ID used as a parameter to the function or object Action (such as Global.DoWaitFor(objId) ). RVL contains special feature intended to make pick-up of object from the list easier.

Using Rapise Visual Language (RVL) 5.1 with Multiple Sheets

With the release of the new Rapise Visual Language (RVL), there have been some questions about how to use it to organize tests, subtests and multiple sheets. For example:

  • I see that I can create multiple sheets.  How does Rapise handle multiple sheets?  Does it run each in order or can they be run separately?
  • Is it possible to call a test in RVL from another test in RVL?  In other worlds, how can I create subtests and scenarios using RVL?