Playback of Java objects buttons in QTP
Question ID: 104430
2
0

QTP can record, but not playback, a Java button click. I verified that the button and all its hierarchy are valid objects. Does anybody have a suggestion?

Marked as spam
Posted by (Questions: 63, Answers: 1)
Asked on December 15, 2011 10:13 am
58 views
Answers (1)
3
Private answer

Have you tried to use the DoClick method? I had the same problem and it worked for me.
Example:


Set obj = JavaWindow(''Itemone'').JavaButton(''MyMessage'').Object
obj. doClick(100)

If that does not work, try using FireEventEx.
Example:


JavaWindow(''Itemone '').JavaButton(''MyMessage ''). FireEventEx  ''java.awt.event.MouseEvent'', ''MOUSE_CLICKED'', 0,''BUTTON1_MASK'', 4, 4, 1, ''true''

For more information look at document on HP knowledgebase (KM182808).

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on December 15, 2011 10:37 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top