assertj-swing icon indicating copy to clipboard operation
assertj-swing copied to clipboard

Windows10 - assertj opens frame under menu bar

Open pkk82 opened this issue 11 years ago • 4 comments

It looks like because of method

  @RunsInCurrentThread
  private void packAndEnsureSafePosition(@Nonnull Window w) {
    w.pack();
    w.setLocation(100, 100);
  }

my test does not work in windows 10 with left positioned menu bare. In my case Robot opens InternetExplorer instead of clicking in application screenshot

pkk82 avatar Oct 11 '15 10:10 pkk82

Thanks for reporting this! Sorry for having to wait this long.. Is there any way to determine bounds of the menu bar in Windows 10?

croesch avatar Feb 15 '16 08:02 croesch

Does SunGraphicsEnvironment.getUsableBounds(config.getDevice()); return something useful?

croesch avatar Feb 15 '16 17:02 croesch

Hi. I haven't checked it. I modified my test by moving window to the centre of the screen. window = new FrameFixture(frame); window.show().moveTo(calculateCenterPoint(frame));

pkk82 avatar Feb 15 '16 18:02 pkk82

Hi @pkk82,

okay but I guess it would be nice to fix this. If you could provide the output of the above command, I can add it to AssertJ Swing.

But you can also close this issue if you think it's not important anymore :)

Thannks

croesch avatar Feb 15 '16 18:02 croesch