Accessing color of QT elements

Best practices, code snippets for common functionality, examples, and guidelines.
kumar.vinay888
Posts: 3
Joined: Wed Nov 16, 2016 1:30 pm

Accessing color of QT elements

Post by kumar.vinay888 » Fri Nov 25, 2016 7:26 am

Hi Team,

We are currently evaluating Ranorex for one of our QT based application. We are currently using Ranorex6.1.1 under trial version.

There are few QLineEdit elements in our application which expect a value in a range (min - max). If the value is changed from the default one, the text color changes to blue. If provided value is out of accepted range, the text changes to Red.

For test purpose, we have to identify the color of the text present in QLineEdit text box.

Using ranorex spy, when I track this element I get no color related properties present. Palette also comes as blank.

Is there any way I can access the color of the text present in my text box.

Please let me know if further input is required from my end.

Thanks in advance,
Vinay

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

Re: Accessing color of QT elements

Post by odklizec » Fri Nov 25, 2016 8:30 am

Hi,

If there is no color-related attribute available in spy, then your (most probably) only hope is to ask your app developers to add the accessibility attribute to the control in question. They can learn how to do this here:
http://www.ranorex.com/blog/enabling-au ... ssibility/

PS, please post a Ranorex snapshot of the problematic element.
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

kumar.vinay888
Posts: 3
Joined: Wed Nov 16, 2016 1:30 pm

Re: Accessing color of QT elements

Post by kumar.vinay888 » Fri Nov 25, 2016 12:16 pm

Thanks for the quick help. I will contact the developer.

But is there any way I can access the Palette of the element without accessibility? Currently palette is showing blank when i track the element by Ranorex spy.

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

Re: Accessing color of QT elements

Post by odklizec » Fri Nov 25, 2016 12:53 pm

I'm afraid, without seeing your app, small demo app featuring mentioned palette or at least a Ranorex snapshot, there is no way for me to tell what's possible or not ;)
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