You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It allows for native UI interactions via keyboard and / or mouse,
20
20
but additionally gives you the possibility to navigate the screen based on image matching.
21
21
22
+
# Examples
23
+
24
+
[nut-tree/trailmix](https://github.com/nut-tree/trailmix) contains a set of ready to use examples which demo the usage ot nut.js.
25
+
26
+
# Modules
27
+
28
+
This list gives an overview on currently implemented and planned functionality.
29
+
It's work in progress and will undergo constant modification.
30
+
31
+
## Clipboard
32
+
33
+
-[x] Copy text to clipboard
34
+
-[x] Paste text from clipboard
35
+
36
+
## Keyboard
37
+
38
+
-[x] Support for standard US keyboard layout
39
+
-[x] Support for German special characters
40
+
41
+
## Mouse
42
+
43
+
-[x] Support for mouse movement
44
+
-[x] Support for mouse scroll
45
+
-[x] Configurable movement speed
46
+
-[x] Mouse drag
47
+
48
+
## Process
49
+
50
+
-[ ] Retrieve the region of a process window
51
+
52
+
## Screen
53
+
54
+
-[x] findOnScreen
55
+
-[x] waitFor
56
+
-[x] Hooks to trigger actions based on images
57
+
-[x] Highlighting screen regions
58
+
59
+
## Integration
60
+
61
+
-[x] Jest
62
+
-[x] Electron
63
+
22
64
# Sample
23
65
24
66
The following snippet shows a valid `nut.js` example (on macOS)
@@ -75,73 +117,31 @@ You can install them by running
75
117
xcode-select --install
76
118
```
77
119
78
-
#### Linux
79
-
80
-
Depending on your distribution, Linux setups may differ.
120
+
**Attention**:
81
121
82
-
In general, `nut.js` requires
122
+
In case you're experiencing problems like your mouse not moving or your keyboard not typing,
123
+
please make sure to give the process you're executing your tests with accessibility permissions.
83
124
84
-
- libXtst
85
-
86
-
Installation on `*buntu` distributions:
87
-
```bash
88
-
sudo apt-get install libxtst-dev
89
-
```
90
-
91
-
Setups on other distributions might differ.
92
-
93
-
## Manual build
94
-
95
-
As a fallback, `nut.js` is able to build all required dependencies by itself.
96
-
To do so, some setup is required on the respective target platform.
125
+
If an application wants to use accessibility features, a permission pop-up should be shown.
126
+
If not, you could try to manually add the application you're running the script from.
97
127
98
-
#### Windows
99
-
100
-
In order to install `nut.js` on Windows, [Windows Build Tools](https://www.microsoft.com/en-us/download/details.aspx?id=48159) and [Python 2](https://www.python.org/downloads/windows/) are required.
101
-
You can either set them up manually, or install them via npm:
@@ -225,43 +225,54 @@ Next, we add a `rebuild` script to our `package.json`:
225
225
Now all we have to do is run `npm run rebuild` and `electron-rebuild` will fetch the appropriate bindings for our Electron version.
226
226
Currently `nut.js` provides bindings for all ABI version to work with Electron v4.x up to 8.x
227
227
228
-
#Examples
228
+
### Manual build
229
229
230
-
[nut-tree/trailmix](https://github.com/nut-tree/trailmix) contains a set of ready to use examples which demo the usage ot nut.js.
230
+
As a fallback, `nut.js` is able to build all required dependencies by itself.
231
+
To do so, some setup is required on the respective target platform.
231
232
232
-
#Modules
233
+
#### Windows
233
234
234
-
This list gives an overview on currently implemented and planned functionality.
235
-
It's work in progress and will undergo constant modification.
235
+
In order to install `nut.js` on Windows, [Windows Build Tools](https://www.microsoft.com/en-us/download/details.aspx?id=48159)and [Python 2](https://www.python.org/downloads/windows/) are required.
236
+
You can either set them up manually, or install them via npm:
236
237
237
-
## Clipboard
238
+
```bash
239
+
npm install --global windows-build-tools
240
+
```
238
241
239
-
-[x] Copy text to clipboard
240
-
-[x] Paste text from clipboard
242
+
or
241
243
242
-
## Keyboard
244
+
```bash
245
+
yarn global add windows-build-tools
246
+
```
243
247
244
-
-[x] Support for standard US keyboard layout
245
-
-[x] Support for German special characters
248
+
#### macOS
246
249
247
-
## Mouse
250
+
On macOS, Xcode command line tools are required.
251
+
You can install them by running
252
+
```bash
253
+
xcode-select --install
254
+
```
248
255
249
-
-[x] Support for mouse movement
250
-
-[x] Support for mouse scroll
251
-
-[x] Configurable movement speed
252
-
-[x] Mouse drag
256
+
#### Linux
253
257
254
-
## Process
258
+
Depending on your distribution, Linux setups may differ.
0 commit comments