Forum Discussion

Ag3nt49's avatar
Ag3nt49
Occasional Contributor
8 years ago

Objects not being seen by Object Browser during test run

Hey,

 

so I'm trying to run a keyword test for a powerbuilder application. My TestComplete is configured for MSAA objects. Part of the test I am trying to run involves opening a window, filling in some search criteria, running the search, and then acting upon a specific object within the search results.

 

However, I am having difficulty with the last step in this test. If I open the window through running the keyword test and run the search, the objects that I have mapped inside of the search results window do not appear as child objects of the window inside of TestComplete's Object Browser. 

 

However, if I open the window and run the search manually, then the test is able to act upon the search result objects, and they appear as child objects of the window.

 

So my question is, what is different between TestComplete Engine, which I have driving the test exactly like how a user would, and what I am doing manually?

 

What would potential workarounds for this be?

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Sounds like there needs to be an object tree refresh somewhere in your automated test.. that after you run the search, refresh the NameMapping tree and see what happens.  

    • Ag3nt49's avatar
      Ag3nt49
      Occasional Contributor

      Hello Tristaanogre,

       

      Thank you for the suggestion, it is helping me come up with potential ways to get around this situation. Unfortunately it did not appear to work, as I added in a script to refresh the process tree after the test performed the search. The only way that I have been able to consistently get the objects to appear within the object browser is through running the search manually.

       

      That being said, this exercise did uncover additional information for me that I was not previously aware of regarding this:

      1. When I am able to force the objects to appear in the object browser, they have a ClassName property of (Empty). I'm not sure if this may have something to do with TestComplete's difficulty finding them, as part of the configuration for working with MSAA objects involved specifying certain classnames for the objects we would want to work with from what I recall.

       

      2. Before I run the search, there are 29 children of the panel that holds the search results, and after the search is run there are 30. However, when comparing the lists to each other, there does not actually appear to be a new object there, even after a refresh. Am off to look up how to use the FindAllChildren method now. Hopefully that may lead me to something