UltraGrid Cell - Font Color and an Image Verfication

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Rajneesh Goyal
Posts: 2
Joined: Thu Aug 13, 2015 7:30 am

UltraGrid Cell - Font Color and an Image Verfication

Post by Rajneesh Goyal » Mon Sep 14, 2015 2:40 pm

Hello Team,

I have to verify an image (Arrow) in the UltraGrid Cell along with the data font color. I am not sure how to verify the image in the cell but the font color is verified using InvokeRemotely method. Please find attached the image.

regards,
Rajneesh
Attachments
UltraGrid Cell Data.jpg
UltraGrid Cell Data
UltraGrid Cell Data.jpg (8.75 KiB) Viewed 1102 times

kam
Posts: 10
Joined: Tue Sep 08, 2015 12:08 pm

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by kam » Mon Sep 14, 2015 3:04 pm

Hi Rajneesh,

Sorry I couldn't answer your question, but part of your asked question was about to answer my own question.

I would like to verify font-color of a string (or text) and realized that you mentioned 'InvokeRemotely' method; please how can i implement it and could you please share your code (if possible).

Thanks and hope your question would be answered by expert soon.

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

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by odklizec » Mon Sep 14, 2015 3:19 pm

Hi guys,

Could you please post the Ranorex snapshot of your elements in question? Without snapshot, it's hard to suggest something definitive. Screenshot is unfortunately not helpful at all.

Rajneesh, if the image is not traceable by Ranorex as an individual element and you cannot find an info about it via spy, you will most probably have to use Image validation. Please check the user guide or for example this screencast...
http://www.ranorex.com/support/screencasts.html#c2529
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

kam
Posts: 10
Joined: Tue Sep 08, 2015 12:08 pm

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by kam » Mon Sep 14, 2015 4:47 pm

Hi Odklizec,

Thanks for your response.

I have no Snapshot for the element i'm discussing; this is because it came from clipboard as in code below:

Code: Select all

Container dataGrid = form.FindSingle<Container>("ranorex rxpath");            
            int count = dataGrid.Children.Count;
            IList<Unknown> rows = dataGrid.Children;
            foreach (Unknown child in rows)
            {
                Unknown cont = child.Children[0];
                Unknown cellsCont = cont.Children[1];
                IList<Cell> cellsList = cellsCont.FindChildren<Cell>();
                foreach (var cell in cellsList)
                {
                    cell.Click();
                    Keyboard.Press("{ControlKey DOWN}{ckey}");
                    Keyboard.Press("EscapeKey");
                    string actualData = Clipboard.GetText();
                    Console.WriteLine(actualData);            
                }
            }
actualData (variable in above code) is the element i'm trying to get its color and store it to a variable or compare it with expected known color.

Many thanks.

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

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by odklizec » Tue Sep 15, 2015 10:20 am

Hi kam,

I believe this is the code you using for obtaining the content of wpf grid cells we discussed few days ago? If I'm not mistaken, InvokeRemotely is available only for winforms, not wpf elements.
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

kam
Posts: 10
Joined: Tue Sep 08, 2015 12:08 pm

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by kam » Tue Sep 15, 2015 1:33 pm

That's correct (it is previous code) odklizec.

Please do you know any available wpf option(s) that suit my scenario.

Thanks.

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

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by odklizec » Tue Sep 15, 2015 1:49 pm

Hi,

Unfortunately, I don't work with wpf controls, so there is not much I can suggest you regarding the wpf options. I can only suggest to check the wpf-related posts discussing similar problems, like this one...
http://www.ranorex.com/forum/unable-to- ... t8349.html
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
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: UltraGrid Cell - Font Color and an Image Verfication

Post by Support Team » Thu Sep 17, 2015 1:48 pm

Hello Rajneesh Goyal and kam,

May I ask if you were able to solve your issues?

If not, it would be great if you could send a Ranorex Snapshot of the corresponding element to [email protected].

This would help us analyzing the issue.

Thank you in advance.

Regards,
Johannes
.
Image