Highlighted
Super Contributor.
Super Contributor.
512 views

Assertions for desktop application

How is it possible to verify, that a specific text is present in a window? How could I save text messages from windows?

Labels (1)
0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Assertions for desktop application

Hello

there are different ways to check/verif text with UFT, please check out this links, maybe are useful for you and answer your question.

https://admhelp.microfocus.com/uft/en/14.03/UFT_Help/Content/User_Guide/Config_Text_Recognition_TEST.htm

https://admhelp.microfocus.com/uft/en/14.03/UFT_Help/Content/User_Guide/Text_Recognition_Options.htm

https://admhelp.microfocus.com/uft/en/14.03/UFT_Help/Content/User_Guide/Text_Recognition_Options_Overview_TEST.htm

Let me know if this information is useful for you and if you think that solves your problem feel free to mark it as a solution.

Best Regards,

-Joaquin Viquez

Highlighted
Super Contributor.
Super Contributor.

Re: Assertions for desktop application

Text recognition is not needed, because it is present as text, I can also highlight it. I am just not sure, how to grab and store it.

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: Assertions for desktop application

You could use GetVisibleText or Use GetROProperty method along with the property name depending on the object type to retreive the value/text from the object.

Msgbox Window("Window").GetVisibleText

Msgbox Window("Window").WinEdit("EditBox").GetROProperty("text")

Msgbox Window("Window").WinList("ListBox").GetROProperty("Selection")

_____________________
Rajkumar Rajangam
Highlighted
Super Contributor.
Super Contributor.

Re: Assertions for desktop application

I tired to identify element, which contains text:

"Class Name:=UIAObject",
"abs_x:=560",
"abs_y:=291",
"acceleratorkey:=",
"accesskey:=",
"automationid:=JavaFX13",
"controltype:=Pane",
"enabled:=True",
"focusable:=True",
"focused:=True",
"frameworkid:=",
"height:=273",
"helptext:=",
"hwnd:=1313258",
"name:=JavaFX13",
"nativeclass:=",
"path:=\*:\*:JavaFX16:JavaFX15:JavaFX14:JavaFX13",
"supportedpatterns:=",
"text:=",
"visible:=True",
"width:=800",
"x:=8",
"y:=102"

Not sure, how to get text from it.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.