Control java application depends on display resolution
Posted: Mon Mar 02, 2015 9:21 am
I've been testing two java applications. Here my test steps:
1. Open Application "A" and wait until the ui loading is finished successfully
2. Start the secound application "B" and wait until the ui loading is finished successfully
3. Click on a button of application "B" and make some user interactions
4. Close application "B"
5. Close application "A"
This won't be working anytime on a remote machine. I execution this steps multiple times with different protocols (RDP, RFB(VNC)). Often the first execution fails by executing step 3. In that case the application isn't in foreground and will not getting in foreground by run the click() method of a button. Ranorex shown the error "LineageGlueRule 'java_window' caused IOException on Execute. ...".
To resolve this problem, I add ensureVisible() and active()-method before the click() will be execute. When I run this script the application always stays in background and the LineageGlueRule error will thrown by the first time of execution. I tried a few solutions and read some LineageGlueRule error - report in the forum. Finally I get the reason of this issue - it's the display resolution! If I connecting to the remote machine with an display resolution smaller than 1920 x 1080px this issue will taken. In contrast an connection with an display resolution greater than 1920 x 1080 px will executing successfully and no exception is thrown. How can I solve this problem?
The remote machine is running under windows 7 Enterprise SP1, ranorex 5.3.
1. Open Application "A" and wait until the ui loading is finished successfully
2. Start the secound application "B" and wait until the ui loading is finished successfully
3. Click on a button of application "B" and make some user interactions
4. Close application "B"
5. Close application "A"
This won't be working anytime on a remote machine. I execution this steps multiple times with different protocols (RDP, RFB(VNC)). Often the first execution fails by executing step 3. In that case the application isn't in foreground and will not getting in foreground by run the click() method of a button. Ranorex shown the error "LineageGlueRule 'java_window' caused IOException on Execute. ...".
To resolve this problem, I add ensureVisible() and active()-method before the click() will be execute. When I run this script the application always stays in background and the LineageGlueRule error will thrown by the first time of execution. I tried a few solutions and read some LineageGlueRule error - report in the forum. Finally I get the reason of this issue - it's the display resolution! If I connecting to the remote machine with an display resolution smaller than 1920 x 1080px this issue will taken. In contrast an connection with an display resolution greater than 1920 x 1080 px will executing successfully and no exception is thrown. How can I solve this problem?
The remote machine is running under windows 7 Enterprise SP1, ranorex 5.3.