See how leaders and teams like yours are capturing up to 300% ROI. Explore the data now!

Login Enterprise: New Feature – GetText

December 14, 2020

We have recently released an important feature in the last Login Enterprise release called GetText.

This blog will describe the benefits and functionality of it.

GetText

GetText is a scripting function in the Login Enterprise workload-scripting language. Essentially it allows for the retrieval of text from an object in an application’s user interface. This text can be used later in the script if desired.

The benefit is being able to test an application based on text visible in it.

Example #1: you have a workflow that will dynamically generate an order number in a product-ordering application. Now you can have the Login Enterprise workload perform an order number lookup to validate the order creation flow.

Example #2: before conditionally proceeding with a workload step, you want to verify an application’s status based on text in the application’s user interface that says, “Ready.” You can do that too!

View the video on how it works.

In the video, we can see an open Notepad.exe with “Hello, World!” and the Login Enterprise test running (green rectangle at the bottom). It will find the text in Notepad.exe, save it as a variable, type this to a Run dialog box, and save the text in the Login Enterprise events, which is viewable in the Login Enterprise web interface.

Further, this text would be retrievable via the Login Enterprise RESTful public API. You could even add external logic around that: conditional automation based on the saved text in the Login Enterprise Event! An example scenario: is the application generating an error string? Then create a help desk ticket or send a sysadmin an email.

The source code for this script is the following, with explanatory comments at the end of some lines:

using LoginPI.Engine.ScriptBase;
public class getTextSample : ScriptBase
{​​​​​​​
private void Execute()
{​​​​​​​
var MainWindow = FindWindow(title:”*Notepad*”,processName:”notepad”); // This will find open Notepad app
var MainWindowTextEditorPane = MainWindow.FindControl(className : “Document:Edit”, title : “Text Editor”); // This will find the text editor control in the Notepad app
var MainWindowTextEditorPaneGetTextValue = MainWindowTextEditorPane.GetText(); // This will get the text in the Notepad text editor control
Type(“{​​​​​​​lwin+r}​​​​​​​”); // This opens a run dialog box
Wait(1);
Type(MainWindowTextEditorPaneGetTextValue,cpm:600); // This types the value to the run dialog box
Wait(2);
Type(“{​​​​​​​esc}​​​​​​​”);
CreateEvent(title:”Notepad text editor value”,description:@”The text in Notepad is: ” + MainWindowTextEditorPaneGetTextValue); // This will create a Login Enterprise event, viewable in the Login Enterprise web GUI or retrievable via API
}​​​​​​​
}​​​​​​​

Preemptively, you can even use the Login Enterprise Application Xray tool to determine if the application’s user interface supports GetText before incorporating it into a workload:

Login VSI Blog - Login Enterprise: New Feature - Get Text - Image 1

As shown, to get started with GetText is easy! For more information or a demo, please contact us!

Login Enterprise Release

Related Resources

Improve Security with Vault Integration
BlogMarch 5, 2024

Improve Security with Vault Integration

Measuring Security Agent Impact on Desktop Images
BlogFebruary 26, 2024

Measuring Security Agent Impact on Desktop Images

Top Ways to Enhance Microsoft Teams Performance
BlogFebruary 21, 2024

Top Ways to Enhance Microsoft Teams Performance

Ready to see how you can transform with Login VSI?