Forum Discussion

amcnamara's avatar
amcnamara
Contributor
9 years ago

Windows showing as dlg and not a shell

I feel this is probably a problem from the java side of things (and/ or SWT) but I'm hoping someone can help me understand.

 

I have a software written in java with lots of shells on shells. Recently, I've noticed a few of these shells have turned to dlg. This is making me very frustrated because all of my name mapping has changed and I can't customize certain aspects of the dialog because it won't recognize the caption anymore (for instance). It is also finding ambiguous windows because all of these windows are being recognized as the same "dlg".

 

Does anyone know why this would be happening or what I can do to check the captions of these dialogs with property checkpoints and deal with them in name mapping now?

 

I have attached a photo of how this looks in my test. The red box is around three different "OK" buttons in different dialogs on top of each other.

5 Replies

  • I'm not sure I have an answer to the direct root of the problem, however I'd suggest creating a framework in your project regardless in case the software under test changes for any reason.

     

    If the developers change something in the software which affects your name mapping you would have to update every test that contains that mapped object. If you create a framework you can just change the framework and your tests will reflect this.

  • NisHera's avatar
    NisHera
    Valued Contributor

      

    There are some points that you have to consider with test automation

    1) GUI automation is most suite to regression test with a matured product(which means GUI are almost frozen)

    2) When you map objects (name mapping) think about future changes. So carefully map stable high level useable objects,

    rest of them call in runtime using find Child or similar methods

    3) try to call one mapping only in one place(Say Script A). All relevant tests refer script A. that is what you call framework

    4) Test complete speeder than most applications. Think about timing.   when TC trying to operate application object, if it is not fully formed, there will be infamous error "Object not found"

    • amcnamara's avatar
      amcnamara
      Contributor

      Perhaps I didn't explain my question well enough. 

       

      I'm mostly wondering if other java automators have seen this problem. Dialogs don't allow you to do the same things a Shell allows you to do and I'm wondering if anyone else has randomly had their software change windows in this way.

       

      My name mapping is not compeltely messed up, I can just no longer customize NEW windows I want to use. They are all listed under "dlg" and are not identified as unique windows. All previous tests are functioning just fine.

       

      I mostly use keyword tests at this point in time because we were making it as simple as possible for a few select support people to create tests as needed. When we implement this regression suite into our automated release process, I will convert them all to script and use the framework suggestion.