Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertJ still doesn't work with dual monitor and primary monitor to the right #160

Open
gorbeia opened this issue Jul 2, 2015 · 8 comments
Labels

Comments

@gorbeia
Copy link

gorbeia commented Jul 2, 2015

I think this may be a duplicate of #98. Still I have updated to version 2.1.0 but the tests are still failing in a dual monitor setup where the main monitor is to the right.

I have created a Junit test that runs when the main monitor is to the left and fails when the main monitor is to the right: https://gist.github.com/gorbeia/60e7c6039cd2e8592243.

@croesch
Copy link
Collaborator

croesch commented Jul 8, 2015

Thank you for opening that issue and contributing a test.

Unfortunately for me the test works on both of my working machines. One is running xfce4-wm and the other is running standard Ubuntu with compiz.

The test neither fails if I switch the monitors. Unfortunately there is no option to say let the right monitor be the main monitor.

Which OS do you use? And if not Windows, which window manager?

As it may take a good while till I'll have time to try reproducing the problem on several machines I would suggest that you try analyzing the problem and contribute a fix. That would be really kind!

You can have a look at #98 (comment) to get a start where to look at the code.

Also you can try to apply the patch for AWT class.

@gorbeia
Copy link
Author

gorbeia commented Jul 8, 2015

I forgot to mention that the error is happening in Windows 7.

@PAX523
Copy link

PAX523 commented Jul 15, 2015

@croesch Did you try this setting on Windows 7?

2015_07_15_16_18_54_systemsteuerung_alle_systemsteuerungselemente_anzeige_bildschirmauflosung

As far as I can see the robot becomes created for the left screen instead of the primary screen in WindowStatus, now:
- r = robotFactory.newRobotInPrimaryScreen();
+ r = robotFactory.newRobotInLeftScreen();

@croesch
Copy link
Collaborator

croesch commented Jul 15, 2015

Thanks @gorbeia that's an important information :)

@PAX523 unfortunately I did test #98 just under Linux. I might just revert the commit on #98 and see if it works under Windows 7 as expected. Then compare the coordinate system of the robot with the one created under Linux in both cases.

Just to make sure, does the Java version have any effect?

@gorbeia
Copy link
Author

gorbeia commented Jul 27, 2015

The test fails on Java 7. It opens the window in the right main screen and tries to click in the left screen.

It works fine on Java 8. It opens the window in the right main screen and clicks in the same screen.

@croesch
Copy link
Collaborator

croesch commented Oct 5, 2015

Thanks @gorbeia! So if you use Java 8 everything works as expected?

@PAX523
Copy link

PAX523 commented Oct 5, 2015

With jre1.8.0_11_x64 I'm still faced with the same issue. @gorbeia Which exact version of Java did you use?

@mmlinford
Copy link

Just wanted to chime in and say I'm experiencing the same problem. I'm running Windows 7, jdk1.8.0_05 (x64) and running JUnit tests from Eclipse Luna. When my left monitor is set as the primary the tests run fine. When the right monitor is the primary they fail. The cursor will automatically move over to the center of the left monitor, then jump up to the top of the monitor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants