1

I'm trying to check a background color of a Cell or part of TableViewer's row in an RCP Application using Jubula. Certain columns in a row have their backgrounds colored based on their use in certain data structures.

The application supports selection of the entire row, not a cell, and I would like to check the background color of a specific cell or group of cells in a TableViewer's row, (selected or even unselected).

I can select the row by index and column value based on he column heading string easy enough... but don't know how to check the background color. A slight complication is that when the row is selected the JFace tableviewer changes the color to the default selection color of light blue.

I'm new to Jubula using RCP testing with Eclipse E4 (no 3.x bridge).

I've seen some suggestions about finding the Property and Value of the property, but am not certain how to attain this Property String when the cells are populated by the createColumn() method of a JFace TableViewer. I don't seem to see how to retrieve this specific value from the UI in Jubula.

Any suggestions or directions on how to perform this color check would be helpful and most appreciated. Thank you in advance for your suggestions.

Marv

Marv
  • 77
  • 9

1 Answers1

1

As you said; you have to select the cell with a Test Case (ub_tbl_selectCell for example), then use a ub_tbl_checkPropertyAtMousePosition

PROPERTY_NAME: background
PROPERTY_VALUE: Color {230, 230, 230}
OPERATOR: equals

Make sure you set the Component name at this Test Case too, even though you would expect it to find the Component under the mouse pointer.

The color format is SWT Color's toString() return, so the values respond to the RGB codes.

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25
  • Works perfectly! THANK YOU.... for the 'background' PROPERTY_NAME and format of the PROPERTY_VALUE Color {r, g, b}. That's exactly what I need to perform this... and thanks for the tip on making sure all steps have the Component Name specified... it's crucial for this to work properly... Also Sorry for the late Check on best answer. – Marv Aug 10 '16 at 11:11