getROProperty("rows") : strange behaviour - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: getROProperty("rows") : strange behaviour (/Thread-getROProperty-rows-strange-behaviour) |
getROProperty("rows") : strange behaviour - SAKDOSS - 09-04-2009 Hello, First I just would like to say that the AUT is quite weird. When a window is opened, closed and reopen in it there are 2 instances of this window. The second one is normal and the first one is not displayed and not reachable by any means (but it still exists). I don't know if it will help but since I really don't know why my code is not working... Description : In a test I would like to add a row in a JTable and display the number of rows before and after this operation. The problem is that in some cases, it works fine and in other cases the number of rows that I get thanks to getROProperty("rows") is the same before and after. 1 - It's ok if I open the application and then do the test : Code: openMyApplication 2 - It's ok if the application is opened before the text. (the code is the same without the two first lines and it displays "1") 3 - It doesn't work if the application is already opened and if the window is closed but have been opened before Code: openMyWindowInTheApplication I'm using QTP 9.5 with the Java add-in. The window and the table are in the OR and their identification work fine. Thanks in advance ! RE: getROProperty("rows") : strange behaviour - basanth27 - 09-04-2009 Could be a Refresh issue. Try to kill the object reference and then re-initiate it. RE: getROProperty("rows") : strange behaviour - SAKDOSS - 09-04-2009 Could you tell me how to kill an object reference ? ^^ I found a workaround. If I use "table.Object.updateUI()" and then "table.Object.getRowCount()" it's working ! But it still displays "0" with "getROProperty"... Really strange... |