Forum Discussion

mikev's avatar
mikev
Contributor
14 years ago

Unable to highlight object...not visible

This might be a
hard one to figure out. In my test, I launch a modal dialog, which in
turn launches another modal dialog. Data-driven test, the first time
through the DDT, everything is great. However, the second time I launch
the second modal dialog, the test hangs. At first I thought maybe my
NameMapping description just wasn't good enough. It is. When I try to
highlight the object, I get "Unable to highlight this object on screen
because it's not visible." The object IS visible. When I spy it, it's
visible. Oddly enough, when I Show object in Object Browser, it's NOT
visible. What in the heck could be going on?

2 Replies

  • In looking at this a little more closely, there are actually two objects that are exactly the same in the object browser.  At least with the human eye, all the descriptions look the same, except one of them is "visible" and the other one isn't.  Somehow, it looks as though the first time through, either the application is not "closing" the object, and when a new one is launched, there is a duplicate.  Then when I'm trying to access it, TC only "sees" the one that isn't visible.  Weird, but I can't think of a work-around here.



    AWTComponentName for the dialog that isn't visible is 'dialog8', the AWTComponentName for the new on is 'dialog9', so as far as TC is concerned, I can see that it thinks they are different.  However, the description(s) that I'm using in the NameMapping are:



    JavaFullClassName, AWTComponentAccessibleName and JavaClassName.  These values are the same for both objects.  Even if I use FindChild to identify the object (not using NameMapping), because there are two objects with the same description, how can I find the one?  Check Visible too?  VisibleOnScreen?
  • Hi,



    Visible property should be true for one and false for other. Thats the only way to find it. I am using the same technique for me.

    Hope this helps.



    Regards,

    Saurabh