Highlighted
Absent Member.. Absent Member..
Absent Member..
576 views

Why isn't regexpwndtitle picking up multi-line value shown in object spy in UFT?

Jump to solution

Here's what is happening:

1. Application (C++) is displaying a popup message

2. Object Spy shows the regexpwndtitle property of the message text as having a value of "multi-line value"

3. When the property/values are copied into the clipboard and then viewed,
the regexpwndtitle value shows regexpwndtitle:= Special: This
allows you to save the value\.\r\n, which is the second line in the list!

I've tried setting the regexpwndtitle to a regular expression that should match the text in the first line of the message (.*subset of first line of popup message.*), to no avail.

Anyone with similar difficulties that has cracked this?

Thanks

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Assuming you are trying to capture text of a static object whose parent is a dialog, this is the code to get the property value into a variable.

Dim title, prop
prop = "regexpwndtitle"
title = Dialog().Static().GetROProperty(prop)
print title

If you want to try out another property like "text" assign it to prop variable instead of regexpwndtitle


Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.

View solution in original post

3 Replies
Highlighted
Absent Member.
Absent Member.

Did you try to capture the value using GetROProperty and see if it works ?


Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Can you please provide a little more detail on how to do this?  Thanks

0 Likes
Highlighted
Absent Member.
Absent Member.

Assuming you are trying to capture text of a static object whose parent is a dialog, this is the code to get the property value into a variable.

Dim title, prop
prop = "regexpwndtitle"
title = Dialog().Static().GetROProperty(prop)
print title

If you want to try out another property like "text" assign it to prop variable instead of regexpwndtitle


Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.

View solution in original post

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.