How to check property value of disabled java tab button, UFT 12.02

Hi,

I have 3 java tab buttons in Java application. All three are visible. Two buttons are enabled, 1 button is disabled (I see its, but cannot click on it). The problem is that tab buttons are not seen by qtp object spy as separate objects. I can record switching beetween two enabled button (.Select "Tab name") (in object repository, function highlight in application also doesn't show seperate object). GetROProperty returns value of active tab so first I must click on tab, then I use GetROProperty.

 

I have problem with disabled tab button. I must to check that tab button is disabled and verify his name. I don't know how do that. When I try select that button I get UFT error that this button is disabled.

 

I hava java add-in.

Parents
  • Verified Answer

    Hi mariozx,

     

    In order to verify the properties of the different JavaTab items, you will need to use an internal method of the JavaTab object. The method to use will depend on the class of the JavaTab object. For example, for a JavaTab object belonging to the standard javax.swing.JTabbedPane class, we could use:

     

    JavaWindow("SwingSet").JavaTab("Frame title:").Object.isEnabledAt(index)

     

    Which would return a boolean value stating if the JavaTab item at position index (indexes start at 0) is enabled. We could even enable/disable the item through:

     

    JavaWindow("SwingSet").JavaTab("Frame title:").Object.setEnabledAt 1,False ' This would disable the item

    JavaWindow("SwingSet").JavaTab("Frame title:").Object.setEnabledAt 1,False ' This would enable the item

     

    If you still have difficulties, please let me know the class_path value of your JavaTab object and I will try to help you if it is a standard Java class.

     

    Kind Regards,

    Francisca

  • Hi Francisca,

     

    Thank you for your help. It works.

     

    Regards,

    M.

Reply Children
No Data