Forum Discussion

lisa_jimenez's avatar
lisa_jimenez
New Contributor
5 years ago

Object Browser sometimes not updating during Silverlight Out of Browser App testing

While trying to write tests again an out of browser SIlverlight application (v 5.1.50918.0), I'm finding that the object browser is sometimes not updating while clicking through the application, causing objects that I can see on screen to be not visible on screen in the eyes of TestComplete (v 14.40.1539 x64). The tests will fail because the objects cannot be found by TestComplete, even though I can clearly see them on my screen.

 

Adding a Sys.Refresh() each time I've run into the issue solves the problem, but I'm curious as to why this seems to be needed so often during these tests? The need for the Sys.Refresh() is different depending on who is running the test, as well. It's impossible to know if a test that runs fine on my machine will end up needing a Sys.Refresh() somewhere during the test when run on someone else's machine. 

  • lisa_jimenez's avatar
    lisa_jimenez
    5 years ago

    The problem is that the object is already there, just sitting around and waiting longer during the test doesn't change TestComplete being able to recognize that it is.  

     

    Response from SmartBear support included the following line, which seems to make sense to answer my question of why this happens:

    "This issue typically occurs when an object in an application is already loaded into the application and is later made visible onto the screen. This issue can also occur if the object loads fully before becoming visible."

     

    The best solution for our application is the Sys.Refresh(), we just have to be smarter about how we incorporate it into our tests.