|
Post by sascanagl on Oct 18, 2018 17:03:10 GMT
We recently had multiple support requests revolving around Clicks and Item selections not working consistently. The Actions might work fine on one machine, but not on another machine when using the same code to test the same app.
Some clicks were working just fine, but other clicks were clicking the wrong location.
Lei did some debugging and found that Java was clicking the wrong area when the Display Scaling was not set at 100.
The debug logs we analyzed confirmed that all the calculations for the location of a component were the same (mostly) for a Component or a MenuItem when calculated with the information provided by the testing tool (Selenium). The difference for success or failure was in who performed the click.
When we used the tool (Selenium) to perform the click, it likely sent an onClick event directly to the component and did NOT use a real mouse click at coordinates. Those clicks would work. However, if the code had to revert (or preferred) a Java Robot click—which used a real mouse click at calculated coordinates—then those clicks will be off and fail when the Display Scaling is not set at 100.
Display Scaling may be a new feature of Windows 10, or maybe not. In any case, the Display Scaling needs to remain at 100 so that both types of tools will successfully hit the right coordinates on screen.
|
|
|
Post by leiwang on Oct 19, 2018 3:13:29 GMT
In this Java bug thread Mouse move fails on Windows 10It is said that "This mouse-move problem happens on Windows 10 system with the Windows 10 1709 (the Fall Creators update) with screen scale set to 125% or greater." It has been fixed in the Java version 11.0.1, but we are currently using the Java 8. We should have to live with this bug for a while until we upgrade the Embedded Java to 11.0.1
|
|