Forum Discussion

anitha123's avatar
anitha123
Contributor
13 years ago

How to get the values which are dynamicall generated

Hi,



In our application, the information is dynamically generated that is stored as Label in TestComplete. Everytime the information will change, it will be stored as label, i have to map the object and write in the script for every label. I want that to be general so that it captures all the labels that are dynmaicaaly generated. I do not know how to capture the information that are dynamically generated.



Please find the below script.





if(X.HwndSource_Window.Window.PrintStatusUserControl.btnError.Visible)

     {

   

      Listerror=(X.HwndSource_Window.Window.PrintQueueUserControl.MaintenanceWarning.lstError.ListBoxItem.Label.WPFControlText);

      Log.Message("List Error is" +Listerror);

      Listerror2=(X.HwndSource_Window.Window.PrintQueueUserControl.MaintenanceWarning.lstError.ListBoxItem_1.Label.WPFControlText);

      Log.Message("List Error2 is" +Listerror2); 

 

      

     }



Thanks and regards,

Anitha