07-23-2009, 03:01 PM
Hello,
I'm facing a problem with QTP 9.5 and a Java application.
The application contains a JToolbar.
The JToolBar contains three JButtons that I want to use in a test.
The trouble is that when I record a click on one of them and then launch the test, I've got the message : "Object is disabled".
When I try to add all the objects of the application, the JButtons are not detected.
I noticed that the "enabled" property of the JTollBar equals 0 (for the JButton it's 1). Maybe QTP think that disabled objects can only contains disabled objects or can't contains objects.
The following script which count the number of JToolBar in the application returns 1 :
And the same script with "javax.swing.JButton" returns 0.
I don't know how to solve my problem
Thanks in advance!
I'm facing a problem with QTP 9.5 and a Java application.
The application contains a JToolbar.
The JToolBar contains three JButtons that I want to use in a test.
The trouble is that when I record a click on one of them and then launch the test, I've got the message : "Object is disabled".
When I try to add all the objects of the application, the JButtons are not detected.
I noticed that the "enabled" property of the JTollBar equals 0 (for the JButton it's 1). Maybe QTP think that disabled objects can only contains disabled objects or can't contains objects.
The following script which count the number of JToolBar in the application returns 1 :
Code:
Set chld=Description.Create
chld("toolkit class").value = "javax.swing.JToolBar"
Set chldcln = JavaWindow("MyApplication").ChildObjects(chld)
msgbox chldcln.count
And the same script with "javax.swing.JButton" returns 0.
I don't know how to solve my problem
Thanks in advance!