Knowledge Base Article

> Knowledge Base > Rapise

Created By  dmarkovtsev Monday, August 28, 2017

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.

Out-of-the-box Capabilities

Let's first go over code complete features you get out-of-the-box.

1. Get methods and properties of a recorded object.


2. Get methods and properties of an object assigned to a variable.


3. Get suggestions for internal IAccessible and HWND  (window handle) objects.

Enhancing Code Complete

Let's assume you need to work with Excel objects in your test. You instantiate the Excel application via the following call.

var excelApp = new ActiveXObject("Excel.Application");

If you will try to get code complete suggestions for excelApp object - the list will be empty. This is because Rapise know nothing about Excel.Application type.

To add type definitions for Excel right click in the editor before the line that creates Excel object and choose Import Type Library.

In the opened dialog find Excel and press Import button.

Rapise will generate type definitions from the COM library and place Excel.xml in the root folder of the test. It will also generate a line that loads type definitions into Rapise.


Now code complete list is filled with options.

To get completion variants for another type within Excel COM library specify type name in a variable assignment.







Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 8/28/2017
  • Article ID: KB281
  • Views: 1025