Top Method Summary
Options Name Purpose
CHARACTER DumpTable (character, character) Dumps the records of a database table in the .d (EXPORT) format Notes : Runs in the session under test, so the dump contains the changes of the open test transaction. The dump program is generated into the temp directory and compiled on the fly, because EXPORT needs a static buffer. The data lines only, without the trailer of a Data Dictionary dump. BLOB and CLOB fields are excluded: EXPORT writes them to separate files with a session specific counter in the name, so the lines of two dumps would never be equal @param pcTable The (database qualified) table name, e.g. sports2000.Salesrep @param pcFileName The absolute name of the .d file to write @return The comma delimited list of the excluded LOB fields */
EndTestRun () Ends the test run after the shutdown command Notes : SCL-6198. A registered ISmartTestAdapterShutdownService ends the WAIT-FOR of the application (GUI for .NET: the .NET message loop). Without the service a STOP condition is raised, which ends the WAIT-FOR of a classic ABL GUI application */
Progress.Json.ObjectModel.JsonObject ExecuteCommand (JsonObject) Executes a command Notes : @param poRequest The request @return The response (without the ok property) */
HANDLE FindWidget (JsonObject) Returns the widget named in a request (window and widget) Notes : @param poRequest The request @return The widget handle */
Progress.Json.ObjectModel.JsonObject FindWidgetByLocator (character, character, character, character) Finds exactly one widget by a locator, like the Playwright locators getByLabel / getByRole Notes : Strict: no match and more than one match are errors. The label is compared with the label text (without mnemonic ampersand and trailing colon), name and type with the NAME and TYPE attributes, all case-insensitive @param pcWindow The text to search in the window titles, empty for the most recent window @param pcLabel The label text of the widget, empty for any label @param pcName The name of the widget, empty for any name @param pcType The type of the widget (e.g. FILL-IN, BUTTON, BROWSE), empty for any type @return The JSON object describing the widget (see listWidgets) */
HANDLE FindWidgetInFrame (handle, character) Searches a widget by name in a frame and its child frames Notes : @param phFrame The frame to search @param pcName The name of the widget @return The widget handle or an invalid handle */
HANDLE FindWindow (character) Returns the window the title of which contains the given text Notes : An empty title returns the most recently created window @param pcTitle The text to search in the window titles @return The window handle */
CHARACTER GetBrowseColumnValue (handle, character) Returns the value of a browse column in the selected row Notes : SCL-6242. The column is matched by its name (the buffer field name); when no name matches, by its label @param phBrowse The BROWSE widget @param pcColumn The name (or label) of the column @return The SCREEN-VALUE of the column in the selected row */
CHARACTER GetColumnValue (character, character) Returns a column value of an ADM2 SmartDataObject Notes : The SDO is found by its file name among the persistent procedures of the session @param pcProcedure The text to search in the file name of the SDO (e.g. dsalesrep) @param pcColumn The name of the column @return The column value */
CHARACTER GetLabelText (character) Returns the label of a widget as the user reads it Notes : Removes the mnemonic ampersand (&Save --> Save) and a trailing colon @param pcLabel The LABEL attribute of the widget @return The label text */
CHARACTER GetOptionalCharacter (JsonObject, character) Returns an optional character property of a request Notes : @param poRequest The request @param pcName The name of the property @return The value or the empty string */
Progress.Json.ObjectModel.JsonObject GetSessionState () Returns the state of the session for the auto-waiting of the test runner Notes : The adapter only answers while the AVM waits for events, so any answer means the session is idle. Also returns the wait state, the windows and the widget with the focus @return The JSON object with the session state */
Progress.Json.ObjectModel.JsonObject HandleRequest (character) Parses and executes a request Notes : Errors are returned as {"ok": false, "error": "..."} @param pcRequest The request as JSON text @return The response */
ListFrameWidgets (handle, handle, JsonArray) Adds the widgets of a frame and its child frames to the list Notes : @param phWindow The window @param phFrame The frame @param poWidgets The JSON array to add the widgets to */
Progress.Json.ObjectModel.JsonArray ListWidgets (character) Lists the widgets of all (or one) windows Notes : Diagnostic command to write the steps of a test @param pcTitle The text to search in the window titles, empty for all windows @return The JSON array with one object per widget */
OpenServerSocket () Creates the server socket and enables connections Notes : */
SocketConnected (handle) Event handler for a new client connection Notes : Invoked by smart-test-adapter-callbacks.p @param phSocket The socket of the new connection */
SocketReadResponse (handle) Event handler for data received on a client socket Notes : Invoked by smart-test-adapter-callbacks.p. Every complete line is a request, the response is written as one line. After the shutdown command was answered, the test run is ended (EndTestRun, the launcher undoes the database transaction) @param phSocket The client socket */
Consultingwerk.Studio.SmartTestAdapter.SmartTestAdapter Start (integer) Starts the adapter of the session and opens the server socket Notes : The socket events are processed by the WAIT-FOR of the application under test @param piPort The TCP port to listen on @return The adapter instance */
WriteLine (handle, character) Writes one line to the client socket Notes : @param phSocket The client socket @param pcLine The line to write (without the line terminator) */

Top Constructor Summary
Options Name Purpose
SmartTestAdapter (integer) Constructor of the SmartTestAdapter class Notes : Use the static Start method to create the session instance @param piPort The TCP port to listen on */

Top Property Summary
Options Name Purpose
Consultingwerk.Studio.SmartTestAdapter.SmartTestAdapter Instance
INTEGER Port


Method Detail
Top

CHARACTER DumpTable (character, character)

Purpose: Dumps the records of a database table in the .d (EXPORT) format
Notes : Runs in the session under test, so the dump contains the
changes of the open test transaction. The dump program is
generated into the temp directory and compiled on the fly,
because EXPORT needs a static buffer. The data lines only,
without the trailer of a Data Dictionary dump. BLOB and
CLOB fields are excluded: EXPORT writes them to separate
files with a session specific counter in the name, so the
lines of two dumps would never be equal

Parameters:
pcTable CHARACTER
The (database qualified) table name, e.g. sports2000.Salesrep
pcFileName CHARACTER
The absolute name of the .d file to write
Returns CHARACTER
The comma delimited list of the excluded LOB fields
Top

EndTestRun ()

Purpose: Ends the test run after the shutdown command
Notes : SCL-6198. A registered ISmartTestAdapterShutdownService ends
the WAIT-FOR of the application (GUI for .NET: the .NET
message loop). Without the service a STOP condition is raised,
which ends the WAIT-FOR of a classic ABL GUI application

Top

Progress.Json.ObjectModel.JsonObject ExecuteCommand (JsonObject)

Purpose: Executes a command
Notes :

Parameters:
poRequest Progress.Json.ObjectModel.JsonObject
The request
Returns Progress.Json.ObjectModel.JsonObject
The response (without the ok property)
Top

HANDLE FindWidget (JsonObject)

Purpose: Returns the widget named in a request (window and widget)
Notes :

Parameters:
poRequest Progress.Json.ObjectModel.JsonObject
The request
Returns HANDLE
The widget handle
Top

Progress.Json.ObjectModel.JsonObject FindWidgetByLocator (character, character, character, character)

Purpose: Finds exactly one widget by a locator, like the Playwright
locators getByLabel / getByRole
Notes : Strict: no match and more than one match are errors. The
label is compared with the label text (without mnemonic
ampersand and trailing colon), name and type with the NAME
and TYPE attributes, all case-insensitive

Parameters:
pcWindow CHARACTER
The text to search in the window titles, empty for the most recent window
pcLabel CHARACTER
The label text of the widget, empty for any label
pcName CHARACTER
The name of the widget, empty for any name
pcType CHARACTER
The type of the widget (e.g. FILL-IN, BUTTON, BROWSE), empty for any type
Returns Progress.Json.ObjectModel.JsonObject
The JSON object describing the widget (see listWidgets)
Top

HANDLE FindWidgetInFrame (handle, character)

Purpose: Searches a widget by name in a frame and its child frames
Notes :

Parameters:
phFrame HANDLE
The frame to search
pcName CHARACTER
The name of the widget
Returns HANDLE
The widget handle or an invalid handle
Top

HANDLE FindWindow (character)

Purpose: Returns the window the title of which contains the given text
Notes : An empty title returns the most recently created window

Parameters:
pcTitle CHARACTER
The text to search in the window titles
Returns HANDLE
The window handle
Top

CHARACTER GetBrowseColumnValue (handle, character)

Purpose: Returns the value of a browse column in the selected row
Notes : SCL-6242. The column is matched by its name (the buffer field
name); when no name matches, by its label

Parameters:
phBrowse HANDLE
The BROWSE widget
pcColumn CHARACTER
The name (or label) of the column
Returns CHARACTER
The SCREEN-VALUE of the column in the selected row
Top

CHARACTER GetColumnValue (character, character)

Purpose: Returns a column value of an ADM2 SmartDataObject
Notes : The SDO is found by its file name among the persistent
procedures of the session

Parameters:
pcProcedure CHARACTER
The text to search in the file name of the SDO (e.g. dsalesrep)
pcColumn CHARACTER
The name of the column
Returns CHARACTER
The column value
Top

CHARACTER GetLabelText (character)

Purpose: Returns the label of a widget as the user reads it
Notes : Removes the mnemonic ampersand (&Save --> Save) and a
trailing colon

Parameters:
pcLabel CHARACTER
The LABEL attribute of the widget
Returns CHARACTER
The label text
Top

CHARACTER GetOptionalCharacter (JsonObject, character)

Purpose: Returns an optional character property of a request
Notes :

Parameters:
poRequest Progress.Json.ObjectModel.JsonObject
The request
pcName CHARACTER
The name of the property
Returns CHARACTER
The value or the empty string
Top

Progress.Json.ObjectModel.JsonObject GetSessionState ()

Purpose: Returns the state of the session for the auto-waiting of the
test runner
Notes : The adapter only answers while the AVM waits for events, so
any answer means the session is idle. Also returns the wait
state, the windows and the widget with the focus

Returns Progress.Json.ObjectModel.JsonObject
The JSON object with the session state
Top

Progress.Json.ObjectModel.JsonObject HandleRequest (character)

Purpose: Parses and executes a request
Notes : Errors are returned as {"ok": false, "error": "..."}

Parameters:
pcRequest CHARACTER
The request as JSON text
Returns Progress.Json.ObjectModel.JsonObject
The response
Top

ListFrameWidgets (handle, handle, JsonArray)

Purpose: Adds the widgets of a frame and its child frames to the list
Notes :

Parameters:
phWindow HANDLE
The window
phFrame HANDLE
The frame
poWidgets Progress.Json.ObjectModel.JsonArray
The JSON array to add the widgets to
Top

Progress.Json.ObjectModel.JsonArray ListWidgets (character)

Purpose: Lists the widgets of all (or one) windows
Notes : Diagnostic command to write the steps of a test

Parameters:
pcTitle CHARACTER
The text to search in the window titles, empty for all windows
Returns Progress.Json.ObjectModel.JsonArray
The JSON array with one object per widget
Top

OpenServerSocket ()

Purpose: Creates the server socket and enables connections
Notes :

Top

SocketConnected (handle)

Purpose: Event handler for a new client connection
Notes : Invoked by smart-test-adapter-callbacks.p

Parameters:
phSocket HANDLE
The socket of the new connection
Top

SocketReadResponse (handle)

Purpose: Event handler for data received on a client socket
Notes : Invoked by smart-test-adapter-callbacks.p. Every complete
line is a request, the response is written as one line.
After the shutdown command was answered, the test run is
ended (EndTestRun, the launcher undoes the database
transaction)

Parameters:
phSocket HANDLE
The client socket
Top

Consultingwerk.Studio.SmartTestAdapter.SmartTestAdapter Start (integer)

Purpose: Starts the adapter of the session and opens the server socket
Notes : The socket events are processed by the WAIT-FOR of the
application under test

Parameters:
piPort INTEGER
The TCP port to listen on
Returns Consultingwerk.Studio.SmartTestAdapter.SmartTestAdapter
The adapter instance
Top

WriteLine (handle, character)

Purpose: Writes one line to the client socket
Notes :

Parameters:
phSocket HANDLE
The client socket
pcLine CHARACTER
The line to write (without the line terminator)


Constructor Detail
Top

SmartTestAdapter (integer)

Purpose: Constructor of the SmartTestAdapter class
Notes : Use the static Start method to create the session instance

Parameters:
piPort INTEGER
The TCP port to listen on


Property Detail
Top

Consultingwerk.Studio.SmartTestAdapter.SmartTestAdapter Instance


Returns Consultingwerk.Studio.SmartTestAdapter.SmartTestAdapter
Top

INTEGER Port


Returns INTEGER


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       09.11.2026 08:16:01