Forum Discussion

vigneshSakthi's avatar
vigneshSakthi
Occasional Contributor
9 years ago

how fast we can grab newly opened window object property

Hi TestCompleters,

 

i am working on java applet based desktop application. i want to get clarification on how fast the testcomplete take the object property. 

 

Consider, I open a new window in the application. Window is designed by java applet. it have some loading contents(consider a web page having unloaded images). I use 'FindChild().Visible' . It returns the value only the window loaded fully with the loading contents. Untill i wont return anything(I recoginze this using break point. I put a breakpoint on previous line. After 'FindChild().Visible' i put another break point. I hope you can find the logic). 

 

But i want to know like, if a new window appers(max 100 ms),But the object gets loaded only after the entire window is ready to use(ready to use means - get object only after the loading contents are fully loaded). 

 

6 Replies

  • That sounds like it's pretty much impossible to answer.

     

    I will vary depending on:

     

    • The machine it's running on. It'll take longer on a slower, less powerful machine.
    • What the background process you're waiting for is. Some things will take longer than other to happen. This time may vary as the app acquires more data. It may get faster as it loses/destroys data.

     

    This is a "how long is a piece of string" question I think.

     

    I sounds like you'd be better off using built in functionality, or building your own helper function, that waits for a configurable amount of time, checking if objects exists and/or their associated properties until you either get a match, or pass your timeout threshold.

    • vigneshSakthi's avatar
      vigneshSakthi
      Occasional Contributor

      But TestComplete freeze the object untill it getting loaded fully. Untill the object wont relased in state. If the window is loaded fully, thenonly the object getting used. 

    • vigneshSakthi's avatar
      vigneshSakthi
      Occasional Contributor

      helper function ? is there any option in testcomplete to built our own functionlity to access the object? My oberservation from your answer is like, we can create our own FindChild() in test complete. am i right? Correct me, if i go wrong. 

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        I'm not sure what you mean about testcomplete freezing the object state?

         

        And yes, helper functions are similar to findchild.

         

        Take web pages as an example. While the top level page may think it has finished loading, there can be things like AJAX events still happening and the page is not fully complete until these have finished. But the "page loading complete" property of the page does not accurately reflect this.

         

        And how you check for these sub-page level events completing is different between Internet Explorer and Chrome (due to a bug in Chrome).

         

        In order to get round this, I have my own "helper" funtion which I use to check web pages have completely finished loading.

         

        These helper functions are scripted. Are you using script or keyword tests?