Check if buttom hides a TcxTreeList column
I am trying to check wether a specific button successfully hides a specific column "MyColumn" in a grid. I am performing a keyword test and I do not want to make it screenshot based.
I have a path, lets say Aliases.MyProcess.catalogue
This has several properties, for example:
ClassName = TcxTreeList
ObjectType = VCLObject
wColumn, with wColumn(0) = "MyColumn" and wColumn(1) = "DontCareAbout" and "wColumn(2) = "DontCareAbout2" ..
wRowCount = 3
Now I want to check wether a button hides "MyColumn".
First I assumed that I could access that specific column and check its .visible property using a Property Checkpoint, but either this is not an option here or I am using it wrong. I cannot access the that column specificly.
The desired architecture of my test looks as follows:
Set button to checked state
Property Checkpoint: get MyColumn.visible, expecting it to be True
set button to unchecked state
Property Checkpoint: get MyColumn.visible, expecting it to be False
Can someone help?
Seeing "VLCObject " I assume that you are testing a Dev Express grid...
In Dev Express grid, there is a property something like Aliases......TcxGridSite.GridView.VisibleColumnCount
you can use that in your test
you can get column name using Aliases......TcxGridSite.GridView.VisibleColumns(i).VisibleCaption
where i is column number
so get number of visible column to a variable x
loop through 0 to x comparing visible caption to your caption "DontCareAbout"
if found, column is visible else not visible
If there would be a property like this, I would have used it.
There is AbsoluteCount, AbsoluteItems, AbsoluteVisibleCount and AbsoluteVisibleItems - but they all refer to items in the grid.
There is indeed wColumn (with wColumn(0) as the one I care about) and wColumnCount = 25, but they do not change no matter if I hide this or more columns.
I don't have any examples of this particular control I can look at. but looking at the Dev Express docs (those I can find anyway - they don't make them easy to find!) it looks like these List controls (this is a List, not a Grid) should have a "Styles" property? Not sure if that applies to the whole list, or is on a column by column basis.
Sounds to me like the kind of property that may contain visibility info?
Is anything like that present on your control?
Try something like
SmartBear Documentation Team Lead
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️