Rapise

Articles
Dealing with Unexpected Popup Objects

Some applications show unexpected popup windows. This could be feature announcements, update reminders, license expiration reminders, alerts, internal messengers and so on. Here we are going to show a solution for this problem.

Ways to deal with flaky tests

When you do UI test automation and create a big enough test coverage the probability of having curtain portion of flaky tests increases. In many cases there is no reasonable way in terms of time and resources to mitigate all flakiness from the test coverage. In some cases even a flaky test may still be useful.

What is UI Test Automation Framework?

At Inflectra we think that UI Test Automation Framework is a set of tools with specific features that enables QA teams to develop and run tests, and effectively analyze test execution results.

How to launch a browser in private mode?

In some cases it makes sense to launch a browser in private mode to ensure exact same conditions every time you run a test.  This helps to cope with such things as remembered accounts or pending sessions not disconnected by a previous test.  Learn how to properly adjust browser profiles from this article.

Installing Rapise Browser Extensions without Internet Access

Normally you can install the add-ons for Chrome and Firefox directly from the brower's app store (just search for Rapise). This is the easiest option, and avoids the need to run the browsers in developer mode.

How to Check if Rapise Can Test My Delphi Application

In order for Rapise to be able to test a thick-client desktop application written using Delphi, it needs to support Microsoft Active Accessibility (MSAA), as described in this article - http://edn.embarcadero.com/article/33642

This article demonstrates how to check your application to see if it supports MSAA.

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.

Running nightly tests with RapiseLauncher on VM with RDP

It is common to use UI tests with RDP connected to remote VM. By default this works only while RDP window is open and client is connected. On disconnect remote session gets locked and UI becomes unavaliable for the test. This topic covers a workaround.

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.

How to launch a web browser in Rapise with a specific size

Sometimes when recording a test against a mobile responsive web site, it is useful to be able to record on the local browser (before playing it back against a cloud service such as SauceLabs, Browserstack, etc.). However you want to always record using a specific browser window size.

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.

Troubleshooting the "The Pipe is being Closed" Error during Rapise Installation

Sometimes when you try and install Rapise, you will see the error message "The Pipe is Being Closed", this article provides some solutions for this message.

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.

Custom Attributes for XPath Generation in the Rapise Web Spy

Sometimes web applications use custom DOM attributes for internal purposes. XPath locators containing those attributes are sometimes more stable and resilient. Rapise contains features intended to simplify utilization of such attributes.

How to include file with common function in test

Sometimes it is useful to have common functionality and variables in a separate JavaScript source file. This topic explains the steps to do it.

How to Check if Rapise can Test my Qt Application

In order for Rapise to be able to test a thick-client desktop application written using Qt, it needs to support Microsoft Active Accessibility (MSAA), as described in this article - http://doc.qt.io/qt-5/accessible-qwidget.html

This article demonstrates how to check your application to see if it supports MSAA.

How to run a program as a different user

Sometimes a test needs to run a process as a different user (not the logged in user executing Rapise). It is not possible to use runas command for this purpose because it forces a user to type a password manually.  From this short article you will learn how to reach the goal.

Using Global.DoEncrypt and Global.DoDecrypt to Hide Passwords

Sometimes passwords need to stay secure. Here are simple steps on how to hide some information in Rapise.

Here we will demonstrate usage of Global.DoDecrypt and Global.DoEncrypt available since Rapise 5.4.

How to run CMD shell commands

In some cases a test needs to run a Windows shell command (e.g. dir, ipconfig, gpresult) and capture/parse output. Learn how to do this in Rapise from this short article.

About Rapise ImageFinder

Sometimes the goal is to find specific image on the screen. It may be special symbol, map pointer or an icon. This topic contains ImageFinder and sample test demonstrating its capabilities.

Ways to slow down test execution

There are several types of delays one can use to slow down test execution.

  1. Implicit
  2. Explicit fixed
  3. Explicit with timeout
Running Rapise GUI Tests with Jenkins

Recommended approach is to use SpiraTest and RapiseLauncher designed for this task. In some cases it is not an option and we need to execute a test directly. 

Installing Rapise on PC without Internet Access

In general Rapise installs on disconnected PC without problems. However, if PC contains old version of windows without most recent root certificates then installer may fail due to inability to check application authenticode certificate. This topic explains a workaround.

How to Measure Operation Performance in Rapise

Sometimes we need to track the time taken by an operation. This KB contains suggested approach for Rapise and working sample.

How to store Rapise tests in Git and run them with SpiraTeam

In some cases it is convenient to store tests in the same Git repository where source code of an application under test is located. For example, if you are using Visual Studio Team Services.  From this article you will learn how to execute Rapise tests stored in a Git repository with SpiraTeam and leverage the power of SpiraTeam reporting and analysis features.

Dynamics NAV Support in Rapise

In this guide we describe how to master tests for Dynamics NAV application using Rapise.

  • Rapise provides a complete automated testing solution that can handle all of your technologies in one environment. With support for web, mobile and desktop applications and a wide variety of third-party component libraries.

  • Microsoft Dynamics NAV is an enterprise resource planning (ERP) software suite for midsize organizations. The system offers specialized functionality for manufacturing, distribution, government, retail, and other industries.

How to Enable/Disable screenshots during script execution

Sometimes we need to disable screenshots for a while (during some long loop) or when doing some specific operations. Here we show how to do it.

How to create Spira-friendly Test Set with shared functions and files

The notion of the integrated test framework usually implies common functions and shared data between tests.  Here we provide sample configuration making sharing Spira-friendly.

How Object Recognition Works in Rapise

This article contains of overview of object recognition by UI automation tools in general and its implementation in Rapise in particular.

Search by Name, Text, XPath or Attribute on the Web Page

It is common task to search for an element by its text. In some cases it is the fastest way to find one. This approach works in web browsers and selenium targets.

Using bytext and byname Locators in WinForms

byname and bytext is an universal feature common for Web, UI Automation and WinForms (Managed) targets. Here we consider WinForms (.NET) desktop applications.

Model-Based UI Testing

Model-based testing is widely used for a long time for testing software systems. Typical application fields include telecommunication protocols, embedded software, server software, automotive and reactive systems. What about model-based testing of desktop, web and mobile GUI applications?

Using bytext and byname locators in UI Automation

byname and bytext simplify finding objects by text or by name. 

Elastic XPATH Expressions

When working on UI test automation for a web application a test engineer has to deal with XPATH expressions. They are used to locate UI elements during test execution. It is very important to use such XPATH expressions that do not break when developers update the application. Good XPATH expressions which still find required elements after UI modification can be referred to as resilient or elastic.

In this article we'll consider several examples of elastic XPATH expressions.

 

How to get the most out of code complete feature in Rapise

Writing JavaScript code in Rapise is fun and easy. It has full featured editor with folding, syntax highlighting and code complete. From this article you will learn how to enhance Rapise code complete with support for external types.

How to specify Selenium or Appium capabilities which are not available through Rapise UI?

From this article you will learn how to pass additional parameters to Selenium or Appium target, even if they can not be specified in a profile.  This recipe can be also used to override parameters of a profile right from a test code.

Requires Rapise 5.3+

How to run cross-browser and mobile tests on Sauce Labs?

Sauce Labs allows users to run tests in the cloud on different combinations of browser and OS versions as well as mobile devices and emulators. Learn how to configure Selenium and Mobile profiles in Rapise to enable connection to Sauce Labs services.

Requires Rapise 5.3+

How to run a cross-browser test on a mobile device?

Let's assume you have a cross-browser test which was created on desktop and can be successfully executed on any desktop browser (Chrome, Firefox, Internet Explorer, Safari). You want to execute this test on your mobile devices or emulators. Learn how from this article.

Requires Rapise 5.3+

Tips & Tricks for Rapise and Dynamics 365 for Sales

Essential information to get started with testing Dynamics 365 for Sales.

How to upgrade Chrome browser on Android emulator

Appium requires certain version of Chrome to work with. Even Android 7.0 is shipped with Chrome 51 and this is too old version. From this article you will learn how to upgrade Chrome on your Android emulator.

JSON in Rapise

This topic describes how to read and write JSON data in Rapise

Using Rapise Mobile with a Cloud Device Farm

Rapise connects to mobile devices (iOS and Android) using the standard Appium mobile device testing API (similar to Selenium WebDriver for web browsers). This articles describes how you can use Rapise to connect to a mobile device farm using the Appium mobile device profiles inside Rapise.

Rapise Tips, Tricks & Workarounds when Testing Dynamics AX 2012

During the evaluation of Rapise 5.2 for Microsoft Dynamics AX testing, a customer collected the following tips and tricks from our support team (thanks Maxime!).

Microsoft Dynamics Solutions - Which One Do You Have?

As described in a recent article, Microsoft Dynamics has been going through major changes in the past year, there are now many different products that all bear the 'Microsoft Dynamics' brand, including older legacy tools such as Dynamics AX, NAV, GP, SL and CRM and the new Dynamics 365 platform which has different modules (Sales, Operations, etc.).  This article helps you know which tool you have when you need help from our Rapise support team.

Headless Chrome Testing

Headless Chrome on Windows  is introduced in version 60 . Learn how to configure Rapise to run cross-browser tests using non-GUI mode of Chrome. It works same way as with PhantomJS.

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.

Different Ways of Slowing Down Rapise to Handle Slow Applications

We often get requests for ways to slow down the playback speed of Rapise so that the application under test (AUT) has time to respond. This article describes the different ways and provides suggestions as to when you should use each one.

How to automate Drag&Drop from Windows Explorer into Google Drive

Modern technologies allow to drag&drop files into a browser window to upload them to a server. Such a feature works for example in Chrome browser in Google Drive and Photo applications. In this howto post we'll show how to automate drag&drop of files from Windows Explorer to Google Drive opened in Chrome.

How to integrate Rapise and Elasticsearch

Rapise is a test automation platform for desktop, web and mobile applications. It is designed for building automated and manual end-to-end UI tests and fits any TestOps infrastructure.

Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.

From this article you will learn how to integrate Rapise and Elasticsearch together.

How to integrate Rapise with Jasmine BDD Framework

Jasmine is a behavior-driven development framework. If you want to test UI with Rapise in a behavior-driven way learn how to tie Rapise and Jasmine together.

How to fix IE 11 recording/playback on Windows 64-bit

Symptoms:

  1. When new recording is started Rapise always opens new IE window
  2. Spy does not show DOM tree
  3. During playback no object is found
Debugging Rapise DOM libraries in Chrome using VS Code

Rapise can be extended with DOM libraries to add support for custom UI controls used in modern web applications.  Many of such applications work in Chrome browser. So there may be a need to debug Rapise code embedded into Chrome via Rapise Extension for Chrome. Most powerful and easy way to do this is to add VS Code into the equation.  From this article you will learn how to tie Rapise, Chrome and VS Code together.

Handling Auth prompt in Rapise

Some web site show Auth prompt when entering some area. The prompt is rendered differently by different browser. Here we show how to bypass the prompt in automation scripts.

How I added support for JPopupMenu automation in 1-hour

Example of adding support for Java UI control in Rapise.

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?
Resources for Learning JavaScript

One of the most popular programming languages in the world is JavaScript. Initially conceived by Netscape as a web page scripting language, christened JavaScript to leverage the popularity of Java (which was fairly new and sexy at the time) and now used for servers (NodeJS), desktop apps (ReactNative) and for us at Inflectra, the core technology at the heart of our Rapise test automation system. This article provides some useful resources for those first learning the language.

Rapise Recording/Playback Throw Error Due to ANSICON application conflict

A customer of ours was using Rapise on a computer that was also running the ANSICON application. This changed some of the settings in the Windows registry that affected the Windows command-line parser. This article explains how to clean up the command-line to allow both applications to work correctly together.

Formatting dates in JavaScript

This is a short sample demonstrating how one can format a date

Changing REST Headers When Web Service Testing

When performing web service testing using Rapise you may need to change the HTTP headers being sent with the request. This article provides suggestions on the different ways of doing this.

How to execute a JavaScript function when its name as a string

Sometimes it is convenient to store function names in strings and use those strings to call actual functions. The article describes two ways of how you can do this in Rapise.

Magic Tricks of the Triple Click
This article shows how to select paragraph of text using various types of mouse activities. Also it demonstrates use of clipboard Global.DoTrim function. Working example is attached.
Suppressing Text in Rapise Logs for Sensitive Data
A customer had a question - is there a way to suppress the DoSetText or DoSendkeys methods from sending their text to the logs. They didn't want users to see this text in the Rapise (and SpiraTest) logs because they contained sensitive information (e.g.  passwords).
Rapise Tip - How to Handle a Webpage that Displays an Alert when You Navigate Away
One of our users had a webpage with a form. When it was submitted partially filled, the page came back (after being processed on the backend) with some errors about incomplete form. If the user tried to navigate away from this page via a link (or close the page/browser tab) he was prompted with browser's standard "Are you sure you want to leave this page?" dialog. He needed a way for Rapise to handle this popup when recording and playing back the web test.
Adobe Flash / Flex / AIR Support in Rapise
Rapise 4.0 supports the testing of Adobe AIR Flex applications using the Adobe Integrated Runtime (AIR). Rapise can test applications using a wide variety of different Flex controls and supports testing both Flex 3 and Flex 4 applications.

Rapise 4.0 supports the testing of Adobe Flex applications that are executed by the Adobe Flash Player inside the Internet Explorer, Mozilla Firefox or Google Chrome web browsers. Rapise can test applications using a wide variety of different Flex controls and supports testing both Flex 3 and Flex 4 applications.

[We have depreciated support for testing Adobe Flex/Flash applications in Rapise 5.0 and later, so this article is provided for use by existing customers]

Unusual case where Rapise Cannot Click on Hyperlinks in IE
We have found an occasional situation where Rapise is not able to click on hyperlinks (<A> tags) when you playback a test on IE. The same test works fine on other computers and on other browsers on the same computer.
Web Object Not Found in IE when Object has 0px Size
We had a customer with a problem related to having <div> elements with complex display styles applied inside an HTML anchor tag <a>. The anchor tag was reporting back as having zero size (0px) in IE, so when Rapise tried to locate it to click on it, the browser was not able to find it.
Executing a Windows .BAT Batch File from Rapise
Sometimes you need to run a  Windows batch file (.BAT) from Rapise. Unlike an executable, you cannot simply use Global.DoLaunch() to execute it since it's not actually an application. This article provides the code you need to use.
Testing Popup Windows using Internet Explorer
When you are testing a web application that has popup windows (where the popup is a whole new browser window) you will need to make a slight change to the test script to enable it to playback successfully in Internet Explorer (no change is needed for Chrome or Firefox).
Troubleshooting Java Swing/AWT Testing
When you are testing a Java application using either Swing or AWT you may run into some issues due to the environment. This article collects some of these common cases and provides the recommended solutions.
Where do I get the Microsoft Script Debugger
When you install Rapise onto a computer that does not have Visual Studio or the Microsoft Script Debugger installed you will get a message to install the debugger. This article provides the download link to the necessary debugger.
Testing Adobe AIR Applications on Mobile Devices
We have had a couple of questions about whether Rapise can test Adobe AIR based applications running on mobile devices using platforms such as Android. This article provides some background and also describes the support Rapise has.
What to do When Rapise Doesn't Display the Web Page DOM?
Sometimes when testing certain web applications instead of the browser DOM tree appearing you will see strange results such as "Node0" appearing. This is caused by the application using nested frames with potentially different security origins. This article describes some of the common issues and describes the solution.
Rapise - Cannot Find AllLibraries.json file during Recording/Playback
When recording or playing back a test script on a new PC you may get an error message that Rapise cannot find the path to "AllLibraries.json".This article provides instructions on how to fix the issue.
Testing Multiple Web Browser Tabs at Once in Chrome
Sometimes you have a web test where you need to test the contents of two browser tabs at the same time in Google Chrome. For example you may have an application which opens up a second browser tab and you want to test that changes in the second tab show up correctly in the first tab. This article describes how to perform this kind of testing.
Testing Web Applications that use SVG
One of the more challenging types of web application is that with uses embedded SVG (Scaleable Vector Graphics) in additional to HTML DOM elements. This article describes how to use Rapise to write automated testing scripts for such applications.
Working with WPF and UIAutomation Structures
It is a common situation that desktop applications written using Microsoft Windows Presentation Framework (WPF) will have complex layouts including tabs, splitters and panels having custom grids and tables inside. This article provides help in dealing with such situations, including how to dynamically find items.
Reading the Details of Files on the Windows File System
In the KB62 article - Accessing Files using Rapise we explain how to access the names, versions and locations of files on the Windows file system. One customer asked - can we verify any file details other than version. This article provides sample code for accessing other information.
Accessing the Windows Registry using Rapise
Sometimes when testing local/desktop applications you need to access the Windows registry to verify that keys exist or that keys have specific values. For example you may be testing that a DLL was successfully registered. This article provides information on the 'UsingRegistry' sample that comes with Rapise.
Error attaching to Excel spreadsheet when using Rapise 4.0 with MS-Excel 64-bit
When you are using the global Rapise Spreadsheet object on a system running the 64-bit version of MS-Office, you may get an error attaching to the spreadsheet. This article describes the cause of the issue and provides a solution and workaround.
Testing MS-Word With Rapise
We had some customers that were looking to record some tests against Microsoft Word 2010. When testing against MS-Word 2010 there are actually two parts to the application:
  • There is the application ribbon (the menus, navigation, etc.)
  • There is the MS-Word text window where your content is actually displayed

This article provides some strategies for dealing with both areas.

When recording with Chrome, Rapise does not record actions within frames
When creating web tests with Chrome, objects within cross-frames are not recognized by the Rapise Web Spy and recorder. This article gives a solution.
Using Rapise to test websites that contain frames
If the website under test contains frames, that presents some challenges to test automation. This article gives tips for success and explains the current limitations.
Different XPath Options in Rapise 4.0
When testing complex data-driven web applications using Rapise, it is helpful to understand the different ways that Rapise can automatically learn the objects. Rapise can learn an object using either XPATH or CSS. In the case of XPATH there are several strategies that Rapise can use to make the testing more robust. This article describes these strategies and provides some suggestions about which one is the best to use for different scenarios.
WebSpy Attribute Filtering
The v4.0 release of Rapise adds enhanced attribute filtering to the Web Spy as well as different options for creating XPath queries automatically. This article explains why you would want to use these features and how they can make the testing of complex data-driven web applications much easier.
Using Global.DoLoadObjects to Use Rapise Objects from External File

One of the challenges using an automated testing tool is to organize things in a way that it is logical enough to find something quickly, structured enough to avoid duplication and simple enough to maintain and upgrade.

This statement is also true for Rapise objects. A common requirement is to deal with the same objects within a flow of different test cases. For instance, if an application has “Log In” functionality then many, many tests will require logging-in and logging-out. Each test will have this object in its own object tree. However this causes trouble if a change in the application affects the recognition of the Log In object. All of the test cases will need to be updated. In such situations it is much more convenient to have the “Log In” objects placed into their own file and re-used by other tests.

Global.DoWaitFor vs Global.DoWaitForProperty
The most commonly used synchronization option to make Rapise wait until the application under test (AUT) is ready is the Global.DoSleep(milliseconds)function. However having just a sleep may cause an unnecessary delay because we have to consider the maximum wait interval and it may be much less on average. Rapise includes some additional synchronization options for more fine grained control of the test case flow.
Using CheckObjectExists(xpathOrObjId) to See if Web Object Exists on Page
This articles describes how you can use the Navigator.CheckObjectExists(...) function to see if a web page exists and how it differs from the Global.DoWaitFor / DoWaitForProperty functions that are described in another article.
What is the purpose of the Tester.EndTest() Function?
The Tester.EndTest() function in Rapise is describes as: Marks end of a currently executed test. Calculates test results and performs finalization of test execution. We have found that some of our customers have been confused as what the purpose of this function is.

Desktop Application Testing - Choosing the Right Library
Suppose we have a situation that a thick-client (desktop) application under test (AUT) is based on a technology that is too old or not completely supported by Rapise. Rapise has a number of libraries for different types of apps. Usually Rapise finds the correct libraries using its auto-detection, but sometimes an application is unusual and the auto-detection fails.
How to automate the testing of TinyMCE Rich Text Boxes using Rapise
When you have a rich text box in a web application, the process for recording a test and playing it back will be different to a standard HTML plain text box. When you are using the popular TinyMCE rich text box you have more options to automate it by using its special client-side JavaScript API.
Dynamically constructing the .rest file URLs to test REST APIs
Sometimes when using Rapise to test REST web services, you want to be able to dynamically change the base URL of the web service yet still use the same URL template and method information. This article describes a process for achieving this.
Web testing - Dynamically Switching the Browser in the Same Test
Sometimes you have a test that you want to run on Chrome, Firefox, and IE in the same script. Normally you write a browser-agnostic test and then have SpiraTest simply call Rapise with different browser names as a parameter and then you have the same test executed multiple times. However suppose you want to have a single test that by itself can run on all the necessary browsers. This article addresses this case.
Measuring browser performance with Rapise
How do you get the exact time that Rapise takes to load a page? Now, the reports summary shows the overall execution time but if you have pause times between steps then these times are added to the total time of that a page took to display. Customers have asked if Rapise has some kind of function that will allow them to see only the transaction time between pages without the pause times. Does Rapise have something like that? This article provides a solution to these cases.
Using Rapise to populate data in an Excel Spreadsheet
The built-in Spreadsheet object in Rapise makes it easy to read data from an MS-Excel spreadsheet. What happens if you want to write data back to the Excel sheet?
Dynamically changing object locators for Web applications
Sometimes you want to dynamically change the XPATH or CSS used in a specific object from within the test script itself. This article explains the process for doing this.
Customizing the Rapise Reports
By default, the reports displayed within Rapise report back each test activity and assert statement as a line in the report with all of the activities and events being displayed in a single flat list regardless of whether they happen inside the main Test() function or a sub-function. This articles explains how you can extend the reporting.
Using Rapise 3.1 to test a web page with a multi-select list
When you have a multi-select list in a web application, you may need to check which items are selected, or to check whether or not a particular item is selected. This article illustrates how to do that.
Calling Rapise DoX functions without reporting result
When you use a DoX command in Rapise to perform a specific command (e.g. DoDOMChildrenCount() to get a number of object's DOM children), in the report an extra step -- assert -- is created during test execution. Sometimes you want to be able to call a function 'quietly' without it affecting the report.
Accessing the Computed Style Properties of an HTML DOM Object
A common question from our users is, is there a way to get object's style properties that are in effect at a certain point in time. (for example, it could have been inherited from higher level of hierarchy, or modified via JavaScript running on the page)? This article describes how to do this.
Certain Hyperlinks won't click during playback with Internet Explorer (IE)
Sometimes when you record a test script using IE and then play it back, some of the clicks on hyperlinks will not playback correctly. Rapise will list them as Passed, but the click won't actually be performed.
Rapise cannot connect to Firefox immediately after Firefox updates

If you try and connect to Firefox with Rapise immediately after Firefox has updated, you may see the following error message:

Microsoft JScript runtime error: 'Navigator.GetBrowserHWND()' is null or not an object

Fixing 'Unable to cast object of type 'System.DBNull' to type 'System.String'' errors in Spira v4.x
Sometimes when you are saving Rapise test scripts into some early versions of Spira v4.2.x.x (e.g. Spira v4.2.0.1 - v4.2.0.5) you can start getting these errors on the Test Case details page. You may also get the error for other reasons in earlier versions of Spira v4.x.
Accessing the Spira v4.2 REST API to get test cases in a release
This article describes the process and provides an example for accessing the Spira v4.2 REST API to get a filtered list of test cases in a release.
How to Use Sub-Tests and Common Objects with REST Web Service Tests
It is often useful to have a common set of code libraries and objects that can be reused amongst multiple tests. With Rapise this can be done by creating a common test and then including it into the other actual tests. However due to the way REST web service tests are stored, there are some slight changes needed to handle REST services. This articles describes the process.
Rapise Won't Record Steps or Display Reports
If you are running Rapise and you suddenly start to find that none of your recordings get saved and the reports are not displaying during execution it may be due to the fact that you have saved your Rapise test folder onto a Network Share.
Scripts created with Rapise 2.1 or earlier no longer playing back correctly in Rapise 2.2 or later
In Rapise 2.2, "DoClick" behavior was changed, so we don't do a click but rather just position the mouse over the control and do API-level "click" event. However we provided a way to enable backward compatibility.
Testing Silverlight Applications
When testing Silverlight applications, you may find that Rapise fails to recognize the objects in the Silverlight app using the UIAutomation library. When using the Rapise Spy Tool, the  whole app is identified as a single window. The objects such as a dropdown, buttons etc. inside the silverlight app are not individually recognized.
Disabling the generation of comments during Recording
By default Rapise records user actions with a line commented out for each action. This articles describes how you can disable this behavior if you just want the script lines recorded on their own.
My Actions are Not Recorded
By design Rapise tries to record user activity on the highest possible level. This makes recorded actions more readable and universal (often several lower-level user actions are combined)

Rapise uses a heuristics to distinguish meaningful activity from low level actions. In some cases this leads to a result that some user activity is not automatically recorded (for example, a mouse click before entering  text in a box). There is a broad range of available UI platforms and libraries. The variety of graphical widgets makes user interface robust and beautiful. Rapise tries to recognize as much objects as possible. However this range is growing and there are always widgets that are not being recorded.
Anti-Virus Software and Test Automation

Anti-virus software is very sensitive to test automation tools. This is normal, because test automation tools usually do API, keyboard and mouse hooking to be able to record and playback user actions.

How are Global Functions stored and recalled?
We need to call many common functions from a common library frequently.
Why is My Flex application recorded as mouse clicks?
A Flex application requires some instrumentation to be ready for testing. By default Flash player has security restrictions preventing Rapise from accessing the application contents. Please, check the this help topic to learn more about Adobe Flex testing.                
The Recorder asks for a Library. Which should I choose?

In most cases "Auto" is the best choice. Manual selection of libraries may be needed in more advanced scenarios and is intended for experienced users.                

Does Rapise work with Windows UAC?
If you are using Rapise on Windows Vista or Windows 7 it is not necessary to disable the Windows User Account Control (UAC) to use Rapise. Unlike some other automated testing tools on market, you can use Rapise with UAC enabled.                
Executing Under a VM or Remote Desktop
Sometimes you need to test an application running on a VM or remote computer using Remote Desktop (RDP) rather than a physical terminal. This guide explains how to ensure that Rapise is able to correctly fire events on the application under test.
Waiting Until Application Ready
Sometimes you need to synchronize the test script so that it waits for a specific application event (change for status message or wait for some specific value). This guide explains how to ensure that Rapise waits for the appropriate condition.
Reading an Object's State
Sometimes it is necessary to examine the state of an object. For example, determine if Toggle Button is pressed or not, Radio/Check Button is checked or not, etc. This guide describes a couple of different ways of achieving this.
About Highlighting (Flash Command) Rectangles
Rapise has a choice of visual effects it can use when highlighting a control being learned during the recording process. This guide describes the different modes.
Choosing Object Type Manually
Sometimes Rapise will incorrectly recognize a GUI component. This guide outlines how you can manually change the object type captured during recording.
Capture Screenshots During Playback

When playing back a test it is useful to be able to capture the screen as its current state so that the cause of any test failures can be more easily deduced.

Working with Right-Click Context Menus
The context menu control is not natively supported by Rapise, but one can use a simple workaround.
Working with Selectable Lists
The behavior of list and combobox controls in GUI applications sometimes require additional attention. This guide explains the different types of combobox controls and best practices for testing them in Rapise.
Recording Web Menus
Many web sites have dynamic site menus. This guide outlines the best practices for recording events associated with such dynamic site menus.
My Actions are Not Recorded
By design Rapise tries to record user activity on the highest possible level. This makes recorded actions more readable and universal. However that sometimes means that certain actions that a user performs won't be automatically picked up. This guide explains ways to handle situations when a specific user activity is not recorded.
Recording Mouse Activity
This guide describes the different types of mouse events and how they are recorded in Rapise.
Re-Using Test Logic
It is common for test scenarios to share similar pieces of functionality. A good example of such sharing is login logic. This guide outlines ways in which you can share such logic to avoid having repeated code in your tests.
Working with HTML XPath
When testing web applications you will often need to use XPath to query the browser DOM for elements based on the scenario under test. This guide explains how you can use XPath queries with Rapise to make your browser testing more flexible and adaptive to changes on the screen.
Working with HTML Tables containing Dynamic Data
Many web sites use HTML tables to display lists of tabular data. When testing such applications you will often need to dynamically search for items in the table to verify that the application under test performed correctly. This guide outlines best practices for accessing data held in HTML tables.
Change Object Value or Text
This guide describes the different ways that you can change the value of text label of an object.
Analog Recording
Sometimes the application under test doesn't contain any learnable objects. In that case you may need to use the fallback of Analog Recording. This guide describes how you perform analog recording.
Simulated Objects
This guide describes what simulated objects are and when they should be used.
Passing Test Parameters

There are many different ways of passing test parameters to Rapise from an external system. This guide describes the different ways of passing parameter values to Rapise.

Creating a Set of Tests to Run in Rapise
This guide describes how you manage groups of Rapise tests together in situations where you are not  using SpiraTest test sets.
Using Dynamic Linked Library (DLLs) in Test Scripts
Sometimes you need to call code libraries from your Rapise tests, for example when the built-in JavaScript scripting engine does not provide the necessary functionality. This guide explains how to call an external DLL from your Rapise test script.
How does Rapise detect if a dialog is already open?
There are several ways to find if something is already on the screen, this article explains some of the options.
Analog Testing when the Machine does not have the Break Key
When using Rapise for analog testing you need to use the key sequence CTRL+BREAK to start and stop the analog recorder. However some machines (particularly smaller laptops) do not have a BREAK or PAUSE (often the same function as BREAK) key. This article describes some solutiomns
Using DoDOMChildrenCount and DoDOMQueryXPath to inspect child HTML elements
Often you want to be able to query for the child elements on a web page that are dynamically created and therefore not good candidates for LEARNing individually. This article explains how you can use the dynamic XPATH methods of Rapise to accomplish this task.
After installing Windows Update KB3025390 Rapise No Longer Connects to IE
An old (December 9th, 2014) security update for Microsoft Windows and Internet Explorer (KB3025390)  broke the support in IE for 'out-of-process' code execution. This effectively prevented an automated testing application such as Rapise from automating Internet Explorer (IE) applications. This was subsequently fixed by Microsoft on February 10th, 2015 with the KB 3021952 update.
How to Get Rapise Trace Logging Information
When using Rapise, it is often useful to see how Rapise is identifying objects in the Application Under Test (AUT) and if necessary find out why Rapise is not able to locate a specific object. This article outlines how to increase the logging level in Rapise.
Automating HTML File Upload Boxes with Rapise 2.2+
Sometimes you have to automate the uploading of files using an HTML file upload control. This articles explains how to record and playback such a script.
Code Completion of Native JavaScript Objects
Rapise has built-in code completion logic that lets it suggest the available list of functions for a specific object. However since JavaScript is fundamentally an un-typed language, for the code completion to work, there are some tips and tricks that you can use.
Recording Popup JavaScript Confirmation Boxes
When you are recording a test against a Web application you may have to deal with a popup JavaScript confirm or alert box. This article describes the process for dealing with them.
How to automate the testing of Rich Text Boxes using Rapise
When you have a rich text box in a web application, the process for recording a test and playing it back will be different to a standard HTML plain text box. This is because the browser actually uses a separate IFRAME and HTML document for the editable rich text box. This article explains the process for recording/playing back such a test.
Adding Support for Custom Flex Controls
By default the Rapise Flex library supports a wide variety of Flex controls which will be capable of testing the majority of application. However sometimes there will be an unknown objects which will be learnt as a generic object with FlexObject flavor. The article describes support for such custom Flex controls:
Using Rapise to Validate Display of Data Grid Data

One common requirement is to run a query in an application being tested and verify that the data on the screen matches the data in the application. This article explains the recommended process for doing this.

Choosing the Web Browser in Rapise from SpiraTest / SpiraTeam
When writing a web test in Rapise you will often want to run the same test script in all three web browsers (IE, Firefox and Chrome). You will want to be able to choose the Test Script from within Rapise when debugging the test and then from a Test Set in SpiraTest when you move the test into production. This article explains the process.
Sending Special Keys to the Current Application
You can use the Global.DoSendKeys('...'); command in Rapise to send keypresses to the current application. Sometimes you will want to send special control keys to the application (e.g. Page Down, or CTRL + Key). This article explains the way to do this.
Turning off Chome and Firefox Auto-Updating
When you are testing a web application against different environments, it can be useful disable to default browser auto-updating policies so that you have a stable testing environment. This articles describes how to disable the auto-updating policies of Google Chrome and Firefox.
A DLL required for this install to complete could not be run

If you run one of our installation packages (.msi) and receive the following message:

A DLL required for this install to complete could not be run

Enabling Windows Installer (.msi) Trace Logging
Sometimes when installing our products you get error messages during the installation and it's necessary to provide Inflectra support personnel with detailed trace/logging information so that they can better support you. This article describes the steps necessary to enable Windows Installer (.msi) trace logging.
How to resolve WScript.CreateObject: Could not connect object errors

Sometimes when you install Rapise on a computer that had a previous version of Rapise installed, when you try to record and/or playback a test you get the following error message:

C:\Program Files (x86)\Inflectra\Rapise\Engine\Player.js WScript.CreateObject: Could not connect object.

This article describes the steps to correct the error.

Accessing Clipboard in Rapise
Sometimes when automating a test, you need to access the local Windows clipboard. This article describes how to access the Windows clipboard programmatically.
Testing Win32 applications to verify that controls change display state

Sometimes you may have a button (or other control) that  can have a different appearance depending on the different focus statuses.
 
For example, the default status without focus is a grey image, whereas when the mouse hovering over it becomes blue. Then when the mouse left button is held down on the button (and not released), the image changes to a red image.
 
Finally, when the button is activated using the tab key to tab into the button and the mouse is somewhere else, it has a fourth color.

This article discusses solutions for how to test these kinds of situation

Using Navigator.ExecJS to call Javascript functions
Sometimes you need to call JavaScript code directly from Rapise rather than firing a DOM event (e.g. clicking on an element) and having that element fire a client-side event handler. This article explains some of the pitfalls and techniques for doing this when you have global functions rather than functions that are part of the core browser model.
Getting the State of a Win32 object using Rapise
Sometimes you need to be able to test the state of a specific Win32 object in Rapise to see if it is enabled, disabled, is activated, etc. This sample illustrates how to get the numeric and textual value of the object's state.
Accessing Files and I/O functions using Rapise
Sometimes using Rapise you need to access files on the Windows filesystem, either for testing purposes, or to object test data stored in a flat CSV, TSV or text file. This sample illustrates how you can access the File System using Rapise and the Windows FileSystemObject (http://msdn.microsoft.com/en-us/library/aa242706(v=vs.60).aspx).
Using Simulated Objects

Simulated objects are found by looking at the parameters of the object (x number of pixels from the top of the window, y number of pixels from the left of the window, etc).  One common question that has arisen is - during playback, does Rapise take into account screen resolution?  If the resolution on the computer you run it on is different from the one it records on the location of the object will change relative to the number of pixels.  So on the computer you record it on the top parameter might be 200 but on a different resolution it might be 180.  Would Rapise recognize that the resolution is different and adjust for that?

Javascript .js not associated with Windows Scripting Host

Sometimes if you have installed a program that associates itself with the .js file extension, you will see the following error when you try and record/play a Rapise test:

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
 
Input Error: There is no script engine for file extension ".js".
Accessing Child Objects in a Java AWT/Swing application
This article describes how to access child objects of a Learned Java AWT/Swing object when using the Rapise Java library. Sometimes when you Learn a top-level object, you want to be able to programmatically query the object to locate the child objects that are visible in the Java SPY.
Accessing child components of a WPF / Silverlight ListBox

When you have a WPF or Silverlight application that has a list box (or other control that supports templates such as a Tree) that has an item template that contains sub-controls, you may need to access the individual controls rather than just the entire list item. This article outlines the approach for doing this.

Dynamically changing object locators for WPF/Silverlight applications

Sometimes you will have controls in a WPF or Silverlight application which use dynamic lists.

Depending on certain settings, the widgets in the list will appear in different places.

This means that a Learned Rapise object which works fine if its in the original ListBox[0] location position is then played-back when it's displayed in another position, it will be ListBox[1] or [2].

Unlike the XPath option with web testing, Rapise doesn't currently allow regular expressions (Regex) in locators stored inside the objects.js file. This article describes a way around the problem:

Executing a process and checking if it's still running

If you use the Global.DoLaunch(...) command to launch a Windows console application, it will return a process ID. This article provides some sample code for executing a console application and checking to make sure that the process is not still running.

Executing Javascript commands against web browser
Sometimes you want to be able to open a browser window (e.g. Internet Explorer) and execute JavaScript commands directly against the DOM objects rather than using the Rapise Learned objects. This article explains the recommended way of doing this.
Extending RapiseLauncher inactivity timeout
When executing Rapise scripts from SpiraTest using RapiseLauncher there is a 10-minute inactivity timeout. If your scripts have periods of inactivity that last longer than 10 minutes, you may need to extend the default timeout. This article describes the steps for doing this.
Executing SQL Database Queries from Rapise

Sometimes when you are running Rapise tests you need to run direct database queries to prepare the data in the test application, or you need to make queries against the database to verify that some user interactions left the data in a specific state.

The sample script below illustrates how you can call database queries directly from the Rapise scripting editor:

Selecting Browser for Test
This article describes how to playback a test in a different browser from the one it was recorded in.
Unable to record/play a Java applet using Rapise inside a web browser
Sometimes you have the situation where you can record/play a Java application using Rapise having correctly installed the Java bridge and set the JAVA_HOME environment variable correctly, but applets running inside a web browser do not work. This article provides some suggested solutions
Detecting the presence of an object in Rapise
Often you need to be able to check for the presence of an object and then depending on whether the object is visible perform one of two possible sets of operations. This article explains the recommended way of doing this in Rapise 1.5.
Using Rapise to extract test data from an Excelsheet
Often you want to be able to parameterize your Rapise tests to have a common set of test functions that can use different combinations of test data. You can use a MS-Excel spreadsheet to store the test data and use Rapise to read out the matching values. This articles provides a sample for doing this.
Passing Parameters to a Rapise script through the command line

This article describes the syntax for passing parameters from the Windows 32-bit command-line to a Rapise script. Note that you need to make sure that you're using the 32-bit command line on a 64-bit machine. I.e. follow the instructions in this KB article - https://www.inflectra.com/Support/KnowledgeBase/KB17.aspx

Using Global.DoInvokeTest() to pass parameters between tests

Sometimes you want a test script to be able to call another sub-test as part of its operation. You can do this using the Global.DoInvokeTest('path to test', [parameters]); function. This articles provides a more detailed example for doing this.

The high-level information can be found on our website at: https://www.inflectra.com/Rapise/Guides.aspx?feature=Passing-Test-Parameters

How to handle Windows/Objects that have names that change
When using Rapise to record test scripts against Windows, Java, Flex, or other thick client applications that have windows or objects whose names may change in between test runs, you will usually need to make changes to either the test script or the learned objects so that they can match correctly. This article outlines some suggested techniques for recording/playing back scripts against such applications.
How Do I Ensure No Other Browser Windows Open
When running a test you will often want to make sure there are no other browser windows open. This is commonly done either at the start or end of the test. This article describes how you do this.
How to successfully include and use common functions and objects
It is often useful to have a common set of code libraries and objects that can be reused amongst multiple tests. With Rapise this can be done by creating a common test and then including it into the other actual tests. This article describes the process
Running a Rapise script from the command-line on a 64-bit machine

If you try and run a Rapise script from the command-line on a 64-bit machine you may get the following error message:

cmd.exe

cscript "C:\Program Files (x86)\Inflectra\Rapise\Engine\SeSExecutor.js" "C:\Users\myuser\Documents\My Rapise Tests\MyTest1\MyTest1.sstest"

Results in

CScript Error: Execution of the Windows Script Host failed. (0x80020102)

Test-Scripts suddenly moving/clicking at false locations

If you have your browser zoom set to a value that is not 100% when recording or playing back scripts it will affect the playback reliability. Specifically Rapise will click/move at/to false locations in the test browser.You need to set your browser zoom to 100% before doing any playback/recording activities.

How do I change the URL of the website being tested in Rapise.

We are in the process of adding a new testing server that we would like to be able to run automation scripts against.

 I just wanted to see if there is a process documented for converting scripts and objects to point to a different web address?

Recording Infragistics Applications with Rapise Throws Error

If you try and record a test script in Rapise using just the 'Infragistics' library you will get the following error message:

C:\Program Files (x86)\Inflectra\Rapise\Engine\Recorder.js(285, 3) Microsoft JScript runtime error: 'ManagedObjectSelectableBehavior_OnMouseEvent' is undefined