This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 56091 - Robot model mask doesn't work
Summary: Robot model mask doesn't work
Status: CLOSED FIXED
Alias: None
Product: qa
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ mriem
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2005-03-09 21:49 UTC by Marian Mirilovic
Modified: 2011-02-17 09:34 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2005-03-09 21:49:35 UTC
We are using 
JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);
for performance testing.

But now our tests fail  when we change model mask to Robot.

Example:
-------------
JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);
JemmyProperties.setCurrentTimeout("EventDispatcher.RobotAutoDelay", 1);
SetupWizardOperator.invoke();
-------------

This code fails with timeout , after showing Tools menu test stops and Robot
never push Tools | Setup Wizard menu item !

If you remove first and second line (setCurrentDispatchingModel and
setCurrentTimeout) this test will work without any problems!


We are runnig our tests on JDK 1.5.0_02 (fcs) on Linux, WinXP, Win2k, Sol9, Sol10
Comment 1 L Martinek 2005-03-16 15:48:06 UTC
I have similar problem. I need to push editor popup menu when I have opened Web
Service. I use this code:

JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);
JemmyProperties.setCurrentTimeout("EventDispatcher.RobotAutoDelay", 1);
EditorOperator eo = new EditorOperator("NewWebService");
eo.select(11);
ActionNoBlock anb = new ActionNoBlock(null, "Web service|Add operation...");
anb.perform(eo); 

It doesn't work. When I comment first and second line, it works.
Comment 2 Marian Mirilovic 2005-03-19 09:27:27 UTC
I've found out that it doesn't work on JDK1.4.2_07 (fcs) ;(

Comment 3 Marian Mirilovic 2005-03-19 09:43:59 UTC
Waw it is unbelievable,
it works fine in NB4.0 (FCS) on JDK1.5.0_02 as well as JDK1.4.2_07 !

So it seems we have problem in IDE not in Jemmy, I am sorry for that Shura.

Now I become curiuos , how do we solve it.

I'll try to find a date of change that caused this problem.
Comment 4 Alexandre Iline 2005-03-23 02:09:17 UTC
Any news on this one?
Comment 5 Marian Mirilovic 2005-03-23 06:20:20 UTC
I am quiet bussy now, I'll investigate it .

Shura, have you found anything ?
Comment 6 Jiri Skrivanek 2005-03-24 19:17:40 UTC
I played with this a little bit and found out the following:

1) if you use        
JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK);

jemmy uses DefaultJMenuDriver and it fails.

2) if you use
JemmyProperties.setCurrentDispatchingModel(JemmyProperties.getCurrentDispatchingModel()|JemmyProperties.ROBOT_MODEL_MASK);

jemmy uses QueueJMenuDriver and it passes.

These drivers are really not simple :-). Shura probably can tell the difference
and reason why it is failing.
Comment 7 Marian Mirilovic 2005-03-29 10:09:12 UTC
Shura, could you look at it ASAP ?

After 3 weeks we have no progress on this issue and our performance tests are
disabled, this isn't good state a week before HR.
Comment 8 _ mriem 2006-02-13 03:26:07 UTC
Is this issue still valid? If so please give me a way to reproduce the problem 
by some test case ;).
Comment 9 _ mriem 2006-03-09 00:38:09 UTC
Closing this issue because of timeout. If it needs to be reopened do so, but 
please provide a test-case that allows me to reproduce the problem. Couldn't 
reproduce it on the JUnit tests for Jemmy.
Comment 10 Jiri Skrivanek 2006-05-24 10:04:58 UTC
It appered again.
Comment 11 Jiri Skrivanek 2006-05-24 10:21:12 UTC
Finally I discovered root of problems. When there was an invisible menu item in
popup, next items were ignored. I fixed it in DefaultJMenuDriver both in trunk
and relese55 branch.

Checking in testsuite/src/org/netbeans/jemmy/operators/JPopupMenuOperatorTest.java;
/cvs/jemmy/testsuite/src/org/netbeans/jemmy/operators/JPopupMenuOperatorTest.java,v
 <--  JPopupMenuOperatorTest.java
new revision: 1.6; previous revision: 1.5
done
Checking in src/org/netbeans/jemmy/drivers/menus/DefaultJMenuDriver.java;
/cvs/jemmy/src/org/netbeans/jemmy/drivers/menus/DefaultJMenuDriver.java,v  <-- 
DefaultJMenuDriver.java
new revision: 1.11; previous revision: 1.10


Checking in DefaultJMenuDriver.java;
/cvs/jemmy/src/org/netbeans/jemmy/drivers/menus/DefaultJMenuDriver.java,v  <-- 
DefaultJMenuDriver.java
new revision: 1.9.44.1.2.1; previous revision: 1.9.44.1
Comment 12 Jiri Skrivanek 2006-05-24 10:21:52 UTC
Verified by JPopupMenuOperatorTest.