ContributionsMost RecentMost LikesSolutionsOCR reading cell boundary as '1' and decimal as a comma Hi, I am using OCR to reading the contents of a table. All the checking is done within a loop. I change some values in a particular field and the values change in the table accordingly. However, occasionally OCR is interpreting the cell boundary of a particular cell (only in some iterations) as a '1' and some times the decimal place as a comma. Has anyone seen this issue before and was there a solution to this? SolvedRe: Swing table - Getting the visible value from a cell not the underlying data I'm getting a Python runtime error: The object does not support this property or method. Re: Swing table - Getting the visible value from a cell not the underlying data When you say 'with real access to objects' do you mean the following? def get_cell_value(row, col): table = Sys.Process("XD").SwingObject("JFrame", "Synthetic - Bilada BD - bilada BD", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("JPanel", "", 0).SwingObject("QuantScreen-panel").SwingObject("QuantScreen-tabbedPane").SwingObject("JPanel", "", 5).SwingObject("QuantScreen-table").SwingObject("JViewport", "", 0).SwingObject("QuantificationTable$3", "", 0).SwingObject("JTable", "", 0) value = table.getValueAt(row, col) renderer = table.getCellRenderer(row, col).getCellRendererComponent(table, value, False, False, row, col) if aqObject.IsSupported(renderer, "getText"): value = renderer.getText() return str(value) Re: Swing table - Getting the visible value from a cell not the underlying data def get_cell_value(row,col): if col == 1: table = Aliases.XD.AxialImageSection.QuantScreen_panel.QuantScreen_tabbedPane.Panel.QuantScreen_table.Viewport.QuantificationTable_3.Table value = Aliases.XD.AxialImageSection.QuantScreen_panel.QuantScreen_tabbedPane.Panel.QuantScreen_table.Viewport.QuantificationTable_3.Table.wValue[1,"A"] renderer = table.getCellRenderer(1,1).getTableCellRendererComponent(table, value, False, False, row, col) if aqObject.IsSupported(renderer, "getText"): value = renderer.getText() pass return value I've been playing around with it and got this bit of code which is based on the solution posted here: https://community.smartbear.com/t5/TestComplete-Desktop-Testing/getting-display-format-of-the-data-field-in-java-swing-table/m-p/130220#M7668 but still have not had any success with it. Upon execution of the below line, test complete looks like its doing something but I've waited 10 mins and the line of code has returned nothing to the point where I have to kill Test Complete and re launch. renderer = table.getCellRenderer(1,1).getTableCellRendererComponent(table, value, False, False, row, col) Re: Swing table - Getting the visible value from a cell not the underlying data So I'm quite to new to Python and not sure of what library's well assist me in this. Currently the code I use to access the value of a cell is as follows for col in range(1, len(table[row])): expected_cell_value = table[row][col] # Array which extracts data from a CSv file actual_cell_value = get_cell_value(row,col) if actual_cell_value == expected_cell_value: Log.Checkpoint("Passed") def get_cell_value(row,col): if col == 1: Value = Aliases.XD.AxialImageSection.QuantScreen_panel.QuantScreen_tabbedPane.Panel.QuantScreen_table.Viewport.QuantificationTable_3.Table.wValue[1,"F"] Str = Value.ToString().OleValue; return Str Swing table - Getting the visible value from a cell not the underlying data Hi I've run into a similar problem to the one mentioned in this discussion: https://community.smartbear.com/t5/TestComplete-Desktop-Testing/Swing-table-Getting-the-visible-value-from-a-cell-not-the/td-p/131429 I'm finding it difficult to apply the solution in Python and was hoping someone could help me out. Thanks Solved