Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
53 changes: 40 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
windows-11-arm,
]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
Expand All @@ -41,7 +41,7 @@ jobs:
matrix:
os: [macos-latest]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
Expand All @@ -53,22 +53,49 @@ jobs:
name: artifacts-test-ignore-tcc-db-${{ matrix.os }}
path: |
**/recordings/**/*
test-nvda-install-dir:

install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2025, windows-11-arm]
os: [macos-14, macos-15, macos-15-intel, macos-26, macos-26-intel]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- run: yarn install --frozen-lockfile
- run: yarn ci:nvda-install-dir
- run: Get-ChildItem $env:USERPROFILE\nvda
- uses: actions/upload-artifact@v4
if: always()
with:
name: artifacts-test-nvda-install-dir-${{ matrix.os }}
path: |
**/recordings/**/*
- run: yarn build
- run: |
tmpdir=$(mktemp -d)
cd "$tmpdir"
npm init -y
npm install @guidepup/guidepup
npm install -g "${GITHUB_WORKSPACE}"
export PATH="$(npm bin -g):$PATH"

cat > node_modules/@guidepup/guidepup/manifest.json <<'EOF'
{
"version": 1,
"screenReaders": [
{
"id": "voiceover",
"name": "VoiceOver",
"platforms": ["darwin"],
"defaultDownload": true,
"assets": [
{
"version": "1.0.0",
"platformVersion": "26",
"repository": "guidepup/voiceover",
"release": "v1.0.0",
"asset": "voiceover-macos-26.dmg",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
]
}
]
}
EOF

guidepup install
45 changes: 10 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

## [Documentation](https://www.guidepup.dev/docs/guides/automated-environment-setup)

[![MacOS Sonoma Support](https://img.shields.io/badge/macos-Somona-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sonoma/id6450717509)
[![MacOS Sequoia Support](https://img.shields.io/badge/macos-Sequoia-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sequoia/id6596773750)
[![MacOS Tahoe Support](https://img.shields.io/badge/macos-Tahoe-blue.svg?logo=apple)](https://www.apple.com/uk/os/macos/)
[![macOS Sonoma Support](https://img.shields.io/badge/macos-Somona-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sonoma/id6450717509)
[![macOS Sequoia Support](https://img.shields.io/badge/macos-Sequoia-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sequoia/id6596773750)
[![macOS Tahoe Support](https://img.shields.io/badge/macos-Tahoe-blue.svg?logo=apple)](https://www.apple.com/uk/os/macos/)
[![Windows Server 2022 Support](https://img.shields.io/badge/windows_server-2022-blue.svg?logo=windows)](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022)
[![Windows Server 2025 Support](https://img.shields.io/badge/windows_server-2025-blue.svg?logo=windows)](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2025)

This package sets up your environment for screen reader automation.

It enables automation for <a href="https://www.guidepup.dev/docs/api/class-voiceover"><b>VoiceOver on MacOS</b></a> and <a href="https://www.guidepup.dev/docs/api/class-nvda"><b>NVDA on Windows</b></a>.
It enables automation for <a href="https://www.guidepup.dev/docs/api/class-voiceover"><b>VoiceOver on macOS</b></a> and <a href="https://www.guidepup.dev/docs/api/class-nvda"><b>NVDA on Windows</b></a>.

## Getting Started

Expand All @@ -37,7 +37,7 @@ If you are using GitHub Actions, check out the dedicated [`guidepup/setup-action
uses: guidepup/setup-action
```

### MacOS
### macOS

If you are running this command locally you may need to take some manual steps to complete setup by following the [manual VoiceOver setup documentation](https://www.guidepup.dev/docs/guides/manual-voiceover-setup).

Expand All @@ -49,35 +49,23 @@ If you are running this command in CI/CD, it is recommended to add the `--ci` fl
npx @guidepup/setup --ci
```

#### Ignore TCC.db Updates
#### Ignore TCC Database Updates

If updating the TCC.db is not possible (due to SIP) or required you can skip the database update step by using the `--ignore-tcc-db` flag:
If updating the `TCC.db` is not possible (due to enabled SIP) or not required, you can skip the database update step by using the `--macos-ignore-tcc-db` flag:

```console
npx @guidepup/setup --ignore-tcc-db
npx @guidepup/setup --macos-ignore-tcc-db
```

> [!NOTE]
> If the necessary permissions have not been granted by other means, using this flag may result in your environment not being set up for reliable screen reader automation.

#### Recording

If you are encountering errors in CI for MacOS you can pass a `--record` flag to the command which will output a screen-recording of the setup to a `./recordings/` directory:
If you are encountering errors in CI for macOS you can pass a `--macos-record` flag to the command which will output a screen-recording of the setup to a `./recordings/` directory:

```console
npx @guidepup/setup --ci --record
```

### Windows

#### NVDA Installation

When running on windows a portable NVDA instance compatible with Guidepup will be installed to a temporary directory by default. The location of this installation directory is stored in the Windows registry under the key `HKCU\Software\Guidepup\Nvda`.

If you want to specify the directory that NVDA is installed to you can pass a `--nvda-install-dir` flag to the command:

```console
npx @guidepup/setup --nvda-install-dir <NVDA_INSTALLATION_DIRECTORY>
npx @guidepup/setup --ci --macos-record
```

##### Using HTTP / HTTPS Proxy for Installation
Expand All @@ -89,19 +77,6 @@ If you are using a proxy connection, you must define the proxy URL in an env var
- `HTTP_PROXY`
- `http_proxy`

#### Foreground Timeout Lock

Modern versions of Windows have a setting which prevents new application instances launching in front of other applications in quick succession, requiring over 3 minutes between activations before it will actually show the window - in the interim it launches the window minimized.

Many test automation frameworks will completely close down a browser after a test has finished and then launch a new instance for the next test - on Windows this suffers from the timeout lock on foreground windows. This impacts on screen reader automation which need the window to activate and focus to be able to drive the screen reader on the application.

To mitigate this the setup script updates two keys in the Windows registry under `HKCU\Control Panel\Desktop`:

- `ForegroundLockTimeout` - Specifies the time in milliseconds, following user input, during which the system will not allow applications to force themselves into the foreground. Defaults to `200000`.
- `ForegroundFlashCount` - Determines the number of times the taskbar button will flash to notify the user that a background window has been activated by the system. If the time elapsed since the last user input exceeds the value of ForegroundLockTimeout, the window will automatically be brought to the foreground. Defaults to `3`.

Both of these are set to `0` by the setup script.

## Powerful Tooling

Check out some of the other Guidepup modules:
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@guidepup/setup",
"version": "0.23.0",
"description": "Setup your environment for screen-reader automation.",
"version": "0.24.0",
"description": "Configure your environment and manage screen readers for Guidepup.",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"bin": {
"setup": "bin/setup"
"guidepup": "bin/guidepup"
},
"author": "Craig Morten <craig.morten@hotmail.co.uk>",
"license": "MIT",
Expand All @@ -26,16 +26,15 @@
],
"scripts": {
"build": "yarn clean && yarn compile",
"ci": "yarn clean && yarn lint && yarn build && yarn resolutionFix && yarn start --ci --record",
"ci:nvda-install-dir": "yarn clean && yarn lint && yarn build && yarn resolutionFix && yarn start --ci --record --nvda-install-dir %userprofile%\\nvda",
"ci:ignore-tcc-db": "yarn clean && yarn lint && yarn build && yarn resolutionFix && yarn start --ci --record --ignore-tcc-db",
"ci": "yarn clean && yarn lint && yarn build && yarn resolutionFix && yarn start:setup --ci --macos-record",
"ci:ignore-tcc-db": "yarn clean && yarn lint && yarn build && yarn resolutionFix && yarn start:setup --ci --macos-record --macos-ignore-tcc-db",
"clean": "rimraf lib",
"compile": "tsc",
"dev": "ts-node ./src/index.ts",
"resolutionFix": "ts-node ./.github/workflows/resolutionFix.ts",
"lint": "eslint . --ext .ts",
"lint:fix": "yarn lint --fix",
"start": "node ./bin/setup",
"start:setup": "node ./bin/guidepup setup",
"prepublish": "yarn build"
},
"devDependencies": {
Expand All @@ -53,6 +52,7 @@
},
"dependencies": {
"chalk": "^4.0.0",
"commander": "^15.0.0",
"decompress": "^4.2.1",
"https-proxy-agent": "^7.0.5",
"regedit": "5.0.1",
Expand Down
Loading
Loading