macOS ohjeet

User interface tests

Some of the user interface tests expect that Netbeans/tmcbeans is allowed to move the mouse cursor on the screen. For example to test the buttons in the UI that are created in the exercise. MacOS does not allow this because of the security concerns. This is why tmcbeans has to be given the permission manually.

The permission can be added as follows:

  1. Open the System Preferences. You can open it from example by searching from Spotlight (magnifying glass on the upper right corner) by keyword System Preferences and by opening the System Preferences.app.
  1. Press the Security & Privacy from the opened menu.
  1. From there navigate to Privacy tab and from there to Accessability section.
  1. Press from the lower left corner "Click the lock to make changes.". In the username field there should be the name of your computer. Write if it's not there. Give your password in the password field and click Unlock.
  1. Click the plus-icon. Navigate to the folder where your tmcbeans is installed. Select tmcbeans.app and click Open. Finder navigated to the tmcbeans accessibility-view with tmcbeans added
  1. In the lower left corner, click "Click the lock to prevent further changes." accessibility-view, that doesn't allow more modifications

Now your tmcbeans should be able to move your mouse cursor during the execution of tests. Note that you may not be allowed to move your cursor or open windows during the tests. Tests should be allowed to run without interference in order for them to work correctly.