• 3 replies
  • Latest Post - ‏2013-07-09T11:03:26Z by OttoDiesel
51 Posts

Pinned topic Dynamic Test Objects don't work as expected for modal dialogs

‏2013-06-10T08:35:05Z |

I want to record a dynamic test object on top level of the test object map.

For example I want to record a text field with a prior label "Last name:" in order to find it anywhere on the SUT (if present anywhere). So I only need one test object in the script explorer for acessing that widget.

Basically this works, but if there is a modal dialog displayed and there is a text field both on the modal dialog *and below* the modal dialog, RFT finds only the text field below the modal dialog. But this text field is not accessible because there is a modal dialog preventing access to it (that's why it is called 'modal' I guess ...) RFT does not consider this concerning object recognition. I want to modify RFT test object finding strategy so that it ignores test objects which are not accessible because of a modal dialog.

Here is an image I made to illustrate it and which describes a easy way to reproduce it:

To achieve this I need to find a way to detect if the test object is accessible. But I haven't found a way yet. The methods "exists", "enabled" and "isShowing" cannot be used for that purpose since they all return "true" in this case.

It seems that dynamic test objects include only parent/child relationships but not owner/owned relationships. The latter kind of relationship seems to be a barrier for RFT dynamic test objects. But I see no good reason why it should be like this.

I am a bit surprised that RFT behaves like this, because it does not seem to make sense. It occurs even on the currently newest RFT version

I already contacted IBM Rational about this problem. They understood it now and are still processing the issue.

Does anyone had the same problem or does know a solution?

Updated on 2013-06-28T08:03:36Z at 2013-06-28T08:03:36Z by OttoDiesel
  • OttoDiesel
    51 Posts

    Re: Dynamic Test Objects don't work as expected for modal dialogs


    The same behaviour is in RFT 8.5.

    I would be glad if someone at least can tell me, if he understands my problem with that and give his opinion (bug or feature or ideas for workarounds).

  • Richa@IBM
    1 Post

    Re: Dynamic Test Objects don't work as expected for modal dialogs


    Hi OttoDiesel,

    Thank you for posting this. My understanding is that you have converted a testobject from the ObjectMap to a dynamic testObject. The idea of converting a testobject to dynamic testobject is to find that testobject even when the hierarchy is changed or there is any change at any level in the earlier hierarchy. If you had followed the below steps :

    1. Record on the tree within eclipse IDE.

    2. Convert that tree testobject in the object map to dynamic testobject.

    3. Highlight the dynamic testobject.

    If after above 3 steps you are able to highlight the testobject within the object map, RFT's behaviour is as expected.

    However, if your intention is to find a tree within the modal dialog or any tree, probably scripting find can help you achieve that. An example of scripting find is at :

    Hope it answers your query.



  • OttoDiesel
    51 Posts

    Re: Dynamic Test Objects don't work as expected for modal dialogs


    It has nothing to do with converting a test object into a dynamic test object. I understand the idea of RFT dynamic test objects.

    It is very simple to reproduce, like on the screenshots which I link above.

    Imagine a completely empty object map and Eclipse as a SUT with a modal dialog. Now insert a dynamic test object in the object map from the modal dialog. And then try to find it. It won't work correctly, or at least not as I expect it. The recognition completely ignores the modal dialog, it only searches "under" the modal dialog on the main shell, respectively on the owner of the modal dialog.

    Scripting is no solution for us, since we want to configure the recognition in the object map. Our non-technical people need to be able to automate tests without having to ask programmers too often to solve some test automation issue for them.

    So you insert a dynamic test object on a modal dialog into the object map, but RFT is then not searching on the modal dialog for it but only on the owner window. But it is not located on the owner window but on the owned modal dialog. You see? It is not logical to me.

    If IBM provides no solution, I have to look for a workaround, of course. But my intention is to clarify the issue and so that it is hopefully regarded as a bug and fixed soon.

    Otherwise I maybe have to do some scripting for implementing such a dynamic find. But we have non-technical testers using RFT to automate tests. They should be as independent as possible from programmers when inserting test objects, configuring them and using them in their tests. It would not be productive if a programmer needs to write some code for them each time they need a dynamic test object.

    Basically the test automater with no technical skill should be able to insert a dynamic test object in the map and that it is found by RFT no matter if it is on the main dialog or on a modal dialog. Thus it is sufficient to insert a test object for a first name text field just once per SUT instead of many times per dialog. Stability would be increased by this and maintainability.