Rapise Web

Articles
How to define a profile for Web Application in Rapise

Each web application is unique in terms of assigning attributes to elements and this complicates the process of generating XPath locators. Some applications assign dynamic IDs to elements, some use ARIA attributes and some do not, some values of class attribute have meaning related to element position and some just used for styling . There are also cases when an app contains hidden DOM layers which stack on top of each other. So usage of same set of attributes for generating XPath is not efficient and may lead to weak locators that break after application reloading or slight modification. To cope with these problems Rapise introduces Web App Profile. It is a simple JSON file of a defined structure that instructs Rapise how to build XPath for elements in a particular application. From this article you will learn how to define a profile for your web application.

How to automate testing of Unified Service Desk for Microsoft Dynamics 365

Unified Service Desk (USD) is a hybrid application. It is a windows desktop application with embedded browser components. Follow this guide to setup a test automation framework for USD.

Text Validation Does Not Always Fire on Angular4 Application

Sometimes when you are testing an application written in Angular 4, the text box will not accept a value that is correct during playback (e.g. zip code is not in the right format) when you use DoSetText to set the value.

How to Install the Chrome and Firefox Extensions Offline

By default,  when you want to use Rapise to record and playback web tests using either Chrome or Firerfox, you simply go to the appropriate web browser "store" and install the extension directly from the store. However sometimes you are testing web applications on a machine with no Internet Connectivity.

Hot to disable "Chrome is being controlled by automated test software" message

When you run a test with Selenium - Chrome profile the browser is launched with a warning message below the address bar. It can be disabled.

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.

Rapise Doesn't Launch Because of Missing Windows Fonts

If you don't have some of the standard Window fonts installed (e.g. Courier New), when you try and launch Rapise, it will fail to open correctly. This article provides information on the problem and solution.

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 automatically enter user credentials into Windows Security dialog on Windows 10

Some test scenarios require running processes as different user or entering user credentials into Internet Explorer security prompt.  Rapise can enter user credentials into Windows Security dialog on Windows 10 automatically.

Recording tips for Dynamics NAV 2017 Web Client and Dynamics 365 Business Central

Dynamics 365 Business Central is a successor of Dynamics NAV 2017 Web Client. Both solutions were built by Microsoft using same technology though they have a few differences. Rapise includes a library DomDynamicsNAV which makes test recording and playback of Dynamics NAV web clients a pleasant thing. From this post you will learn basics of recording a reliable test for these solutions as well as test playback troubleshooting methods. We'll use Dynamics 365 Business Central as system under test.

Where Does Rapise Log Errors?

Sometimes when you are using Rapise, you see an error on the screen, or something doesn't work as expected. In that case, our support team will need a copy of the log file that is likely to contain the error message. This article explains how to get that log file.

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

How to run cross-browser tests on BrowserStack?

BrowserStack enables testing of your website for cross browser compatibility on real browsers. Instant access to multiple desktop and mobile browsers.  Learn how to configure Selenium  profiles in Rapise to enable connection to BrowserStack services.

Requires Rapise 5.3+

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.

Testing Visualforce components in Salesforce

Visualforce is the component-based user interface framework for the Force.com platform. Visualforce components can be tested with Rapise just like default Salesforce interface.

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.

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

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.

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).
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.
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).
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.
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.
Rapise 3.x / 4.0 Does not Connect to Chrome x64 Bit
When you try and connect to the 64-bit version of the Google Chrome web browser using Rapise 4.0 (or earlier) you may get the error 'Connection to Chrome Failed!'. This issue has been fixed in the Rapise 4.1 release, but for those customers using Rapise 4.0 or earlier, this article provides two solutions.
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.
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.

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

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.
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.
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.
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.
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.
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.
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 article explains how to record and playback such a script.

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