Forum Discussion

escap89's avatar
escap89
Contributor
9 years ago

Fresh rows recognize by TestComplete

Hi!

 

I have some problem that i solved already but how i did it is far away from the good practices that we should use.

 

In my application that is created under PowerBuilder12 i have alot of datagrids that  shows some data inside.

Application functionality allows me to add some new rows to these datagrids or filter them etc.

 

If i open some window with a datagrid (lets say it shows 1 row) TestComplete recognize that 1 row very well (object spy)

If i add another row by some functionality and try to use object spy again TestComplete recognize still first row but dont see the second one.

What i did in my tests before was close and open a window  with that datagrid (takes timeif i have to do in every case).

 

I established that:

refresh() - no help

findchildby- helps but using  that everytime also takes time

 

Another reason i need it is: i need to test my app also if it shows a new row directly after user add it.

 

I recorded a short video that shows my problem (video is avaible to open in firefox).

3 Replies

  • It may depend on exactly when a save is triggered in the control for the newly added row.

     

    Have you tried moving to a different part of the application, and then coming back to the table. If you try that (and the new row is still present so was definitely saved) and it works, then it would sound like the save is not being triggered when you think it is. You probably want to ask the dev team what the save trigger is.

     

    Or, if you are doing all this against a mapped object via script, you could try RefereshMappingInfo instead of plain old Refresh.

    • escap89's avatar
      escap89
      Contributor

      If i reopen window all rows are already shown in a object browser.

      Prolly Refresh method work as "refresh all" manually in object broweser  - it dosent help.

       

      RefereshMappingInfo - is for mapped object.

       

      I am using original objects names in my script.

       

      Problem here is that TestComplete creating "Object browser" that is used for tests in 2 cases:

      - Frist open window

      - Reopen window

       

      If i just open test complete and go to a datawindow. Then if i'll add another row and then I'll open object spy (or run test - dosent matter its the same) object spy see all rows cus he generated his object browser for first time.

      If i add now another row i wont see it in object spy, need to close a window that have datawindow.

       

      Is there a method that doing the same what do testcomplete for initial application run?

       

      For  testing add/remove functions i can reopen a window - OK -  I can live with that but lets say that i have a filter to test:

      If i have 5 rows before i use filter and 10 after i use filter I wont be able to select 10th row for example cus on "open" window i have some default filter that  returns less than 10 rows.

       

      I also walked around that TestComplete bug :) by selecting 10th row with cordinates and then use filter - it helps cus after that operation TestComplete refreshed his object browser inside my datawindow.

       

       

      All my "ways" still are just a patches for these testcomplete "black holes".

  • Added a screens with object browser.