Interrogating Host Applications

Interrogating a text adapter does not follow the same process as a Windows or web adapter. First, you have to make sure the emulator is set up properly. There are also specific settings for each adapter that have to be set correctly in the OpenSpan Adapter Properties window before you can even begin to interrogate the Host application.

Once you have the correct settings in OpenSpan and the emulator, you can begin interrogation. However, you do not interrogate the emulator. Instead, you interrogate the OpenSpan Text Design screen. If you have set OpenSpan and your emulator correctly, you should see the Host Application appear in the OpenSpan Text Design screen in OpenSpan Studio.

To Interrogate the Host Application, highlight the text to interrogate in the Text Design Screen and then right-click. A menu appears with these options:


Save as Partial Screen

See Partial Screen Matching.


Select Field

This option helps you determine whether you can use the application’s definition of a specific field in a preselected area in the screen. Use this function to select a desired field. OpenSpan Studio will automatically select the field in the text highlighted by the mouse.

This functionality only applies to HLLAPI defined fields and will not work with the DOS adapter.


Save as Field

A field is a section of text recognized by the emulator to specifically send and receive data. Use this function to select a field and return it as an object to OpenSpan Studio.

  1. Highlight the field.

  2. Click Select Field to determine if the field size is appropriate.

  3. Select Save As Field to save the field.

  4. Using the Name property for the control created for the file, rename the control for identification purposes. For example, if the control name is field1, you could rename it to identify the application and function within the project, such as txtLogiWindow.

When naming project items, components, and controls, use a unique name within the project. For example, if you have an adapter named Google and an automation named Google, you will receive an error. This also applies when naming components and controls. As a general rule, do not name components using property names. For example, if you rename a button on a Windows form Text, you will receive a build error as the form containing the button has a property named Text.


Save as Region

Use this option to customize select areas of text for use in a solution. In some cases the host application has defined a very large field length. Unlike the Save as Field option, the Save as Region command will work with any customized area of the screen.


Save as Match Rule

Use this option to select screen text that uniquely identifies a screen within a host application. When matched and returned to Object Explorer, the region creates a screen object and a matched branch in the hierarchy.

The field or region is added to the screen that has already been defined and added to the solution. It has a green check; therefore, it is matched.  

Simple means that the match rule looks for an exact duplicate of the highlighted text. Complex means that it can use regex terminology to find a match.


See also

Text Adapters - Overview

Emulator Adapter Components - Properties, Methods and Events

Host Applications - Property, Method and Event Exceptions by Component Name