Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP9.5 - Java Object recognition
#1
Solved: 10 Years, 9 Months ago Question 
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
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 Sad

Thanks in advance!
Reply
#2
Solved: 10 Years, 9 Months ago
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 973 06-17-2019, 12:19 PM
Last Post: Treirk
  object recognition issue by qtp 11.0 shipu 1 2,401 07-24-2014, 05:57 PM
Last Post: Ankesh
  QTP 11 and VB Object Recognition LauraShadle 0 1,852 06-10-2013, 08:27 PM
Last Post: LauraShadle
  QTP vb treeview object recognition error skozer 1 3,515 12-29-2012, 05:00 AM
Last Post: Ankur
  Object Repository recognition problem Adam82 4 4,116 06-14-2012, 09:01 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)