Capturing a Java Native Context Menu

Capturing a Java Native context menu can be a challenging task, due to the following reasons:

  • The context menu appears on a right-click, and closes automatically when the application loses focus (when you select a different application).
  • The capturing process is complex, comprised of several stages, and therefor may take a relatively long time to complete. During this time, you may move your mouse, and accidentally open a sub-context menu, which can corrupt the capturing process.

Therefore, we strongly suggest following this procedure:

  1. Right-click your Java application to open the context menu.
  2. To capture the context menu, press ctrl + shift + z. (Do not use your mouse at this stage).
  3. Gradually move your cursor over the main Java application. Highlight the main application, but not the context menu.
  4. Carefully move your cursor to the context menu, while avoiding opening sub-context menus.
  5. When the context menu is highlighted, click the context menu, and do not move the mouse until the context menu is successfully located.

    The captured screen element appears in the Screen Elements tree, in the Physical Objects pane.

Note: If you have any problem capturing the context menu, it might be due to a previous error. In this case, we recommend to terminate the Java application process, open the Java application again, and repeat the action.