Contributions
Re: Check if buttom hides a TcxTreeList column
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.1KViews0likes2CommentsCheck if buttom hides a TcxTreeList column
Hello, 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? best, s.1.1KViews0likes4Comments[python] check for 'item not in mylist' causes TestComplete to crash
I am trying to build a list of backpointers. In there, I want to avoid duplicates. As far as i know i cant use a dict or set, because the items to be stored are not hashable. I implented the following code: while k in range(limit): try: if path not in path_backp: path_backp.append(path) continue else: Log.Message(path.Item[k].Text) path = path.Item[k].Items limit = path.Count scan(path, path_backp, e, 0) k = k +1 except AttributeError: path = path_backp.pop() limit = path.Count k = k + 1 the part to avoid double entities of course is: if path not in path_backp: path_backp.append(path) continue else: [...] Im running python inside TestComplete, which has (limited) debugging functions. When I enable the debugger and track what is happening, the first check works. The if-routine gets executed, and because path_backp is an empty dict, path gets appended, so that afterwards path_backp[0] equals path and I get back to to the while-routine. But when the if-routine gets executed the 2nd time (so when path_backp is no empty dict anymore), the debugger freezes for what seems an infinite amount of time. same happens, by the way, when I implemented: if path not in path_backp: path_backp.append(path) without any continue or else. Can anyone explain to me why this is happening and how I can handle the situation? Many thanks, t.794Views0likes2Comments