Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Wed Jun 05, 2019 3:50 pm

We've been happily using Ranorex v8.2.1 for ages now. But obviously the time comes to look into upgrading. I'm going to Ranorex v8.3.3 first. So no, I don't know how this performs on Ranorex v9.x yet.

Question: How do you folks read the text font of a control? I've been using the RawText element that usually sits under a control, since this tells me the font name, size, style and colour. Brilliant. Just what I need.

Except that this no longer works for editable text controls with Ranorex v8.3.3. Works fine in Ranorex v8.2.1 (as shown on the left) but not in Ranorex v8.3.3 (seen on the right in the image below). Works fine for static text labels, but not for edit boxes.

RawTextExample.png
I've attached two snapshots of a ultra basic MFC application I boshed up with Visual Studio 2017 to demonstrate this difference. Same application, different versions of Ranorex.

Ranorex821.rxsnp
Ranorex833.rxsnp
If you happen to take a look, have a gander at the editable text box I added to the About dialog.
You do not have the required permissions to view the files attached to this post.

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Wed Jun 05, 2019 3:52 pm

I think the attachments are all there. This forum keeps telling me the files are "no longer available" apparently. :?: :?: :?:

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by odklizec » Thu Jun 06, 2019 7:19 am

Hi,

Any chance you could post also the sample application you made? There were done some changes to GDI Capture approach, including addition of some Raw text settings. Have you tried to toggle those RAW Text related settings?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Thu Jun 06, 2019 8:31 am

Sure, it's an utterly basic VS new project wizard generated thing, onto which I bunged an edit control. Now attached.

I'm off to do some more investigation and I'll have a look for these rawtext settings, Pavel. There were quite a lot of mentions of rawtext in the v8.3.x release notes, I noted. I've had to fix up several issues in our tests here, as I depend on GDI Capture and things have subtley changed with Ranorex v8.3. There's even one Ranorex introduced issue that I had to work around that I think might even have been fixed in v9.0, but I'm wary of upgrading further just yet because of issues involving MSBuild15. Just wary, we've had some ... 'experiences' with that here, so it makes me nervous. Hence the baby steps first.
SimpleMFCVsRanorex.rar
You do not have the required permissions to view the files attached to this post.

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Thu Jun 06, 2019 8:53 am

So I've just tried toggling each of the following options one-by-one, and then instant-tracking the About/edit box on my sample MFC application, using Ranorex v8.3.3 on Windows10 x64. None make a difference to the raw text detection on edit box controls unfortunately. I'm using the 32bit Ranorex Spy to peer into a 32bit sample application.

Settings/Plugins
  • MSAA/Evaluate computationally expensive attributes
  • RawText/Capture ANSI text
  • RawText/Include text in rectangle filter
  • Win32/Use legacy Form role

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by odklizec » Thu Jun 06, 2019 9:14 am

Hi,

I'm not using VS and therefore, I'm unable to build your project ;) And SharpDevelop doesn't like MSBuild15 as well. Could you please post also exe? Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Thu Jun 06, 2019 9:47 am

Ah, oops, yeah sure. That's just me applying my usual standards, as I wouldn't want to run an .EXE supplied by somebody else on the Internet!!! I assumed the same, sorry.

I've also gone and installed Ranorex v9.1 on a VM that's never seen Ranorex before. I tried the attached .EXE on that Win10 VM too. Exact same problem.

Ranorex v8.2.1 works and detects RawText elements under edit controls.
Ranorex v8.3.3 does NOT detect the same thing - only static labels.
Ranorex v9.1.0 does NOT detect the same thing - only static labels.
RanorexGDICapturev910.png
Ranorex910.rxsnp
SimpleMFCVsRanorexEXE.rar
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by odklizec » Thu Jun 06, 2019 12:20 pm

Thanks for the app. Well, it really seems like there is currently no way to get RAWTexts from this specific control? It's either a bug or an unwelcome side effect of recent GDI access changes? Maybe you should contact directly Ranorex support about this? Another possibility could be using InvokeRemotely, which may help with obtaining font style and other "hidden" attributes from given control? Sadly, I'm not as good in C# to provide a working example ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Thu Jun 06, 2019 12:41 pm

It looks like changed behaviour to me too. I can use this forum thread to provide all my intel to Ranorex Support. Many thanks for taking the time to look at my example, Pavel.

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Querying font when editable text controls are missing RawText elements in Ranorex v8.3.3.

Post by Stub » Mon Jul 15, 2019 9:05 am

This appears to have been resolved in Ranorex v9.1.1. Huzzah!

I saw mention of Ranorex v9.1.1 in some other thread, so I popped off to examine the release notes. There was a mention of, "Fixed a bug where certain raw text blocks would be detected with a width and height of 0 (zero) and thus omitted" which peaked my interest. So I gave it a whirl. Both my failing tests and my sample application now work as they did in Ranorex v8.2.1.
RanorexGDICapturev911.png
You do not have the required permissions to view the files attached to this post.