UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Absent Member.
Absent Member.
1489 views

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

Jump to solution

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.

0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.

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

View solution in original post

0 Likes
2 Replies
Absent Member.
Absent Member.

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

View solution in original post

0 Likes
Absent Member.
Absent Member.

Hi Francisca,

 

Thank you for your help. It works.

 

Regards,

M.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.