benjamin84 / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Investigate possible bug with robotWithNewAWTHierarchy and finding menus. #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From David Amiel:

With some of my test "posting awt events to an EventQueue" doesn't
work:

my code:
  robot = RobotFixture.robotWithNewAwtHierarchy();
  robot.settings().eventMode(EventMode.AWT);
  windows = new FrameFixture( robot,getMainFrame());

 windows.menuItem(new GenericTypeMatcher<JMenu>() {
           @Override
           protected boolean isMatching(JMenu button) {
               return "Test".equals(button.getText());
           }
       }).doubleClick();

When i used "robot = RobotFixture.robotWithCurrentAwtHierarchy()" it
works.

Original issue reported on code.google.com by Alex.Rui...@gmail.com on 15 May 2008 at 5:47

GoogleCodeExporter commented 9 years ago
It seems that getMainFrame is only a getter of an already created frame. Since
'robotWithNewAwtHierarchy' is calling after the creation of the frame 
(apparently),
the robot cannot see the frame. It is difficult to determine if it is a bug. 
The best
to do is to mark it as a duplicate of issue 48. By fixing issue 48, we can 
attach
frames/dialogs to a robot with a new AWT hierarchy.

Original comment by Alex.Rui...@gmail.com on 16 Jun 2008 at 9:51

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 1:58