Forum Discussion

jenny's avatar
jenny
Occasional Contributor
13 years ago

How to make "priorLabel" property display in object browser?

Hello,

I am practising TestComplete7 on Java Applet gui automation test.  Now I have a concern,  could you please give me

some suggestion?  Thank you very much!

Please look at the screenshot in attachments.  I'd like to use prior label text and JavaClassName to find swing object

like TextField, ComboBox, CheckBox etc,  and  TestComplete fail to find this java control because of 'priorLabel' not appearing.  Nevertheless,  Rational Functional Tester  could recognize this  property. 

I have already updated java.policy file according to help document,  also tried this scenario with TestComplete8.5, and faced the same result. 

3 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Jenny,



    priorLabel is a synthetic property provided by Rational Functional Tester - that's why, it isn't available in TestComplete.



    In TestComplete, the AWTComponentAccessibleName property has a similar purpose for Java objects. Will it work for you?
  • jenny's avatar
    jenny
    Occasional Contributor
    Hi, Helen

    Thanks for your response.

    I tried  "AWTComponentAccessibleName" property, but it appeared null value in object browser.  Any other recognition property could I use ?



    Jenny
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Jenny,



    If AWTComponentAccessibleName of controls is empty, then, probably, the labels aren't associated with these controls in the application code (e.g. via JLabel.setTextFor or a similar method). In this case, I'm afraid, there's no way to get a control's label text and to identify controls by neighboring labels in TestComplete.



    So, I recommend that you use other properties to identify these objects, such as JavaClassName, AWTComponentName (the object name as defined in the application's source code) and/or AWTComponentIndex.



    I've also filed a feature request to add a property similar to RFT's priorLabel so that TestComplete could offer better object identification in such situations. Thanks for drawing our attention to this matter!