Rapise Desktop

Articles
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.

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.

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.

How to start Dynamics NAV client

Check that Dynamics NAV client is installed on a machine and launch it if it is not started yet with this simple function.

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 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.

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.

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.

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.

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).
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]

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.
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.
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.

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.
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.
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?
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.
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.
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.
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.
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.

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.                
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.
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.
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.
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.
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.
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
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:
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

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.
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?

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.

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.
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