![]() |
QTP9.5 - Java Object recognition - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: QTP9.5 - Java Object recognition (/Thread-QTP9-5-Java-Object-recognition) |
QTP9.5 - Java Object recognition - SAKDOSS - 07-23-2009 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 : Code: Set chld=Description.Create And the same script with "javax.swing.JButton" returns 0. I don't know how to solve my problem ![]() Thanks in advance! RE: QTP9.5 - Java Object recognition - SAKDOSS - 07-23-2009 It's working fine when I replace : jToolBar1.setEnabled(false); by : jToolBar1.setEnabled(true); in the code of the application. But I don't know if it will have consequences or not. So if anyone have an idea to solve my problem without modifying the source code don't hesitate. |