Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Jemmy FX test not working when GUI is minimized or system locked

User_Q8Y3HJan 20 2021

I have created a simple JAVA FX application and trying to test the application using JEMMYFX.
Using scene dock to get the current scene and trying to get the GUI Components but it is working only when the user is not disturbed and it is failed when application minimized or screen locked.
I am using the remote machine to run the tests using Jenkins and test cases are successful only when logged into the system and failed when remote running and the same has been in the local system as well.
Below code works when focusing on the application and not working when focus loss or system locked.

      SceneDock mw=new SceneDock();
      JFxWindowHandle hndmw=new JFxWindowHandle(mw);
      ICompHandle hndApplyButton=hndmw.discover(ECompType.button,"device_apply");
      hndApplyButton.actionClick();

"device_apply" is the id of the JavaFX button id.
Could please suggest any other possible ways to do it.

Comments
Post Details
Added on Jan 20 2021
0 comments
196 views