Best way to verify special characters, bold and italic text?
Best way to verify special characters, bold and italic text?
I'm currently testing a Flex application using Ranorex. The application under test has similar functionality as a word processor and has features where users can bold and italicze text. Users can also add special characters such as the section symbol. I'm wondering if there is a way to verify if text is bold or italicized, or verify special characters?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Best way to verify special characters, bold and italic text?
Hi,
Following link will show you how to generate a snapshot file:
http://www.ranorex.com/support/user-gui ... files.html
With these snapshot files we can have a closer look on the application/controls and their properties.
Regards,
Markus
Ranorex Support Team
That depends on your application, can you send us a Ranorex Snapshot file of your application when a document with such a bold, italic, ... text is shown?I'm wondering if there is a way to verify if text is bold or italicized, or verify special characters?
Following link will show you how to generate a snapshot file:
http://www.ranorex.com/support/user-gui ... files.html
With these snapshot files we can have a closer look on the application/controls and their properties.
Regards,
Markus
Ranorex Support Team
- jmagaru.inforum
- Posts: 3
- Joined: Fri Sep 14, 2012 5:52 am
- Contact:
Re: Best way to verify special characters, bold and italic text?
I have also the same problem, need to verify if the text is italic, bold or normal in wpf objects,
Hope you can also have some workarounds, except for image capturing, most of the text to validate are dynamic text.
Hope you can also have some workarounds, except for image capturing, most of the text to validate are dynamic text.
Jonathan L. Magaru
Software Quality Engineer - Automation
Software Quality Engineer - Automation
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Best way to verify special characters, bold and italic text?
Hi,
In order to analyze the issue we would need a Ranorex snapshot file of these elements.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.
Thanks,
Markus
Ranorex Support Team
In order to analyze the issue we would need a Ranorex snapshot file of these elements.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.
Thanks,
Markus
Ranorex Support Team
Re: Best way to verify special characters, bold and italic text?
here is a snapshot
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Best way to verify special characters, bold and italic text?
Hi,
Thanks for the snapshot!
This flex control was adapted with the new flex version(spark.components::TextArea) and since Adobe changed the way how the text is displayed we have to adapt the way how we get the information about the formatting string too and this is unfortunately with the current Ranorex version not yet possible.
It should be fixed with one of the next Ranorex versions, there should be an additional property (the name could be "HtmlText").
Regards,
Markus
Ranorex Support Team
Thanks for the snapshot!
This flex control was adapted with the new flex version(spark.components::TextArea) and since Adobe changed the way how the text is displayed we have to adapt the way how we get the information about the formatting string too and this is unfortunately with the current Ranorex version not yet possible.
It should be fixed with one of the next Ranorex versions, there should be an additional property (the name could be "HtmlText").
Regards,
Markus
Ranorex Support Team
- jmagaru.inforum
- Posts: 3
- Joined: Fri Sep 14, 2012 5:52 am
- Contact:
Re: Best way to verify special characters, bold and italic text?
Sorry for late sending snapshot, hope there are workarounds on this issues
You do not have the required permissions to view the files attached to this post.
Jonathan L. Magaru
Software Quality Engineer - Automation
Software Quality Engineer - Automation
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Best way to verify special characters, bold and italic text?
Hi,
No problem
.
Ranorex uses Microsoft UI Automation to identify WPF controls and since this accessibility (UI Automation) infrastructure only exposes a subset of control properties which is limiting in some cases. For example, there is unfortunately no easy way to validate the FontStyle.
One workaround that is possible in this case is to use the ItemStatus property of UI Automation. For example, in the below XAML snippet, just by adding the line (AutomationProperties.ItemStatus="{Binding RelativeSource={RelativeSource Self}, Path=FontStyle}"), the FontStyle of the TextBox is exposed as ItemStatus & can be validate using Ranorex now.
Markus
No problem

Ranorex uses Microsoft UI Automation to identify WPF controls and since this accessibility (UI Automation) infrastructure only exposes a subset of control properties which is limiting in some cases. For example, there is unfortunately no easy way to validate the FontStyle.
One workaround that is possible in this case is to use the ItemStatus property of UI Automation. For example, in the below XAML snippet, just by adding the line (AutomationProperties.ItemStatus="{Binding RelativeSource={RelativeSource Self}, Path=FontStyle}"), the FontStyle of the TextBox is exposed as ItemStatus & can be validate using Ranorex now.
<TextBox Name="MyTextBox" HorizontalAlignment="Left" Height="24" Margin="182,53,0,0" TextWrapping="Wrap" Text="Red" FontStyle="Italic" VerticalAlignment="Top" Width="147" AutomationProperties.ItemStatus="{Binding RelativeSource={RelativeSource Self}, Path=FontStyle}"/>Regards,
Markus
You do not have the required permissions to view the files attached to this post.
- jmagaru.inforum
- Posts: 3
- Joined: Fri Sep 14, 2012 5:52 am
- Contact:
Re: Best way to verify special characters, bold and italic text?
Thanks for the quick reply. But what file do I need to modify to put that workaround?
Jonathan L. Magaru
Software Quality Engineer - Automation
Software Quality Engineer - Automation
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Best way to verify special characters, bold and italic text?
Hi,
You're welcome!
You need to add the specific code to the XAML file where your control is defined.
Regards,
Markus
You're welcome!
You need to add the specific code to the XAML file where your control is defined.
Regards,
Markus