Checking a Textbox's Background Color

Ask general questions here.
Posts: 1
Joined: Tue Oct 02, 2018 6:49 pm

Checking a Textbox's Background Color

Post by dcarlozzi » Tue Oct 02, 2018 6:53 pm

I am writing a test module that will check a specified textbox to see if it's background color is yellow. The only problem is that I cannot find the value in the Ranorex.Text variable. I looked around online to see if anyone else has had the same issue as me, but the solutions I found didn't work. Does anyone know how to find this value through C#?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Checking a Textbox's Background Color

Post by Support Team » Tue Oct 02, 2018 8:54 pm

Hi dcarlozzi,

Often times the color is stored in a parent element and not the text element itself. If you are able to provide a Ranorex Snapshot of this element, I will be happy to analyze your application and recommend the best practice to validate the textbox's color.