Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8303130: Document required Accessibility permissions on macOS #12772

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions doc/testing.html
Original file line number Diff line number Diff line change
@@ -584,7 +584,7 @@ <h4 id="system-key-shortcuts">System key shortcuts</h4>
recommended to disable system key shortcuts prior testing. The steps to
access and disable system key shortcuts for various platforms are
provided below.</p>
<h5 id="macos">MacOS</h5>
<h5 id="macos">macOS</h5>
<p>Choose Apple menu; System Preferences, click Keyboard, then click
Shortcuts; select or deselect desired shortcut.</p>
<p>For example,
@@ -607,25 +607,29 @@ <h5 id="windows">Windows</h5>
or disable hotkeys.</p>
<p>Note: restart is required to make the settings take effect.</p>
<h4 id="robot-api">Robot API</h4>
<p>Most part of automated Client UI tests use Robot API to control the
UI. Usually the default operating system settings need to be adjusted
for correct work of Robot functionality. The detailed steps how to
access and update that settings for different platforms are provided
<p>Most automated Client UI tests use <code>Robot</code> API to control
the UI. Usually, the default operating system settings need to be
adjusted for Robot to work correctly. The detailed steps how to access
and update these settings for different platforms are provided
below.</p>
<h5 id="macos-1">MacOS</h5>
<p>Robot functionality is not permitted to control your Mac by default
starting from MacOS 10.15. To enable it choose Apple menu; System
Settings, click Privacy &amp; Security; select Accessibility and ensure
the following apps are allowed to control your computer:
<code>Java</code> and <code>Terminal</code>. If the tests are run from
an IDE, the IDE should be granted this permission too.</p>
<h5 id="macos-1">macOS</h5>
<p><code>Robot</code> is not permitted to control your Mac by default
since macOS 10.15. To allow it, choose Apple menu -&gt; System Settings,
click Privacy &amp; Security; then click Accessibility and ensure the
following apps are allowed to control your computer: <em>Java</em> and
<em>Terminal</em>. If the tests are run from an IDE, the IDE should be
granted this permission too.</p>
<h5 id="windows-1">Windows</h5>
<p>On Windows there is a delay in focus transfer. Usually it causes
automated UI test failure. To discard the delay type
<code>regedit</code> in the Search and then select Registry Editor;
navigate to the following key:
<code>HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout</code>;
make sure its value is set to 0.</p>
<p>On Windows if Cygwin terminal is used to run the tests, there is a
delay in focus transfer. Usually it causes automated UI test failure. To
disable the delay, type <code>regedit</code> in the Search and then
select Registry Editor; navigate to the following key:
<code>HKEY_CURRENT_USER\Control Panel\Desktop</code>; make sure the
<code>ForegroundLockTimeout</code> value is set to 0.</p>
<p>Additional information about Client UI tests configuration for vrious
operating systems can be obtained at [Automated client GUI testing
system set up requirements]
(https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements)</p>
<h2 id="editing-this-document">Editing this document</h2>
<p>If you want to contribute changes to this document, edit
<code>doc/testing.md</code> and then run
32 changes: 18 additions & 14 deletions doc/testing.md
Original file line number Diff line number Diff line change
@@ -613,7 +613,7 @@ system. Usually that causes the test failure. So it is highly recommended to
disable system key shortcuts prior testing. The steps to access and disable
system key shortcuts for various platforms are provided below.

##### MacOS
##### macOS

Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
select or deselect desired shortcut.
@@ -642,26 +642,30 @@ Note: restart is required to make the settings take effect.

#### Robot API

Most part of automated Client UI tests use Robot API to control the UI. Usually
the default operating system settings need to be adjusted for correct work of
Robot functionality. The detailed steps how to access and update that settings
Most automated Client UI tests use `Robot` API to control the UI. Usually,
the default operating system settings need to be adjusted for Robot
to work correctly. The detailed steps how to access and update these settings
for different platforms are provided below.

##### MacOS
##### macOS

Robot functionality is not permitted to control your Mac by default starting
from MacOS 10.15. To enable it choose Apple menu; System Settings, click
Privacy & Security; select Accessibility and ensure the following apps are
allowed to control your computer: `Java` and `Terminal`. If the tests are run
`Robot` is not permitted to control your Mac by default since
macOS 10.15. To allow it, choose Apple menu -> System Settings, click
Privacy & Security; then click Accessibility and ensure the following apps are
allowed to control your computer: *Java* and *Terminal*. If the tests are run
from an IDE, the IDE should be granted this permission too.

##### Windows

On Windows there is a delay in focus transfer. Usually it causes automated
UI test failure. To discard the delay type `regedit` in the Search and then
select Registry Editor; navigate to the following key:
`HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout`; make sure
its value is set to 0.
On Windows if Cygwin terminal is used to run the tests, there is a delay in
focus transfer. Usually it causes automated UI test failure. To disable the
delay, type `regedit` in the Search and then select Registry Editor; navigate
to the following key: `HKEY_CURRENT_USER\Control Panel\Desktop`; make sure
the `ForegroundLockTimeout` value is set to 0.

Additional information about Client UI tests configuration for vrious operating
systems can be obtained at [Automated client GUI testing system set up
requirements] (https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements)

## Editing this document