Forum Discussion

arorasaksham's avatar
arorasaksham
New Contributor
9 years ago

How to handle dynamic powerbuilder DataWindow?

Hi,

 

I am working on a powerbuilder application having dynamic pbdw control. The rows are loaded based on some filter criteria. I am not able to identify objects in the application. However if i try to spy application which has pre loaded data, i can identify them correctly.

 

for e.g. in the below code. The objExpectationIds doesnt return anything . But if application is preloaded with data before execution it works. Please help

 

PropNames=Array("Caption","ObjectType")

PropValue=Array("expectation_id","Edit")

objExpectationIds=expectationPanel.FindAllChildren(PropNames,PropValue,5)

Log.Message("")

For i=0 to UBound(objExpectationIds)

 

if(objExpectationIds(i).Value="82286") then

objExpectationIds(i).Click

Exit For

end if

Next

 

4 Replies

    • arorasaksham's avatar
      arorasaksham
      New Contributor

      Hi Tanya,

       

      Thanks for response, but refresh doesn't work. Since the datawindow is dynamic and the object browser is not getting refreshed. The object browser is getting freezed for first available instance of data window. Even the spy is not working.

       

      I have tried refreshing already (both by code as well as through object browser). I think this issue is specific to Powerbuilder and testcomplete only.

       

       

       

      • umer_chaudhary's avatar
        umer_chaudhary
        Occasional Contributor
        Tania, I'm customer with TestComplete having more than 4 licenses and im myself TestComplete Certified. I'm also having the same issue with dynamic datawindow elements. On some areas TestComplete sticks to the status of first read elements within dynamic DataWindow elements and doesnt update the future populated objects. I have tried sys.refresh method, delaying script before reading the next object or calling for sys.refreshmappinginfo nothing seems to work. I can also verify that the Object Browser actually gets stuck to the last state and doesnt recognize a change within the area to reload the data probably. Please guide me if there is any way to reload the MSAA plugin on runtime which seems to help get the correct status back? or maybe the sys.refresh function needs improvement for this area? Thanks. Best Regards Umer