Jubula RCP应用程序-选择“行"时检查TableViewer单元格的背景色 [英] Jubula RCP Applicaiton - Check Background Color of TableViewer Cell when Row is selected
问题描述
我正在尝试使用Jubula在RCP应用程序中检查单元格或TableViewer行的一部分的背景颜色.连续的某些列的背景会根据其在某些数据结构中的使用而上色.
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.
该应用程序支持整个行而不是一个单元格的选择,我想检查TableViewer行中(选定或什至未选定)特定单元格或单元格组的背景颜色.
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).
我可以根据列标题字符串轻松选择按索引和列值排列的行...但是不知道如何检查背景色.轻微的并发症是,当被选择的行的的JFace的TableViewer改变颜色的淡蓝色的默认选择颜色.
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.
我不熟悉Jubula,它使用Eclipse E4(无3.x桥接器)进行RCP测试.
I'm new to Jubula using RCP testing with Eclipse E4 (no 3.x bridge).
我已经找到了一些有关查找属性和属性值的建议,但是不确定如何通过JFace TableViewer的createColumn()方法填充单元格时如何获得此属性字符串.我似乎看不到如何从Jubula的UI中检索此特定值.
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
推荐答案
如您所说;您必须选择带有测试用例的单元格(例如ub_tbl_selectCell),然后使用 ub_tbl_checkPropertyAtMousePosition
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.
颜色格式是SWT Color的toString()返回值,因此值响应RGB代码.
The color format is SWT Color's toString() return, so the values respond to the RGB codes.
这篇关于Jubula RCP应用程序-选择“行"时检查TableViewer单元格的背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!