Skip to content

Commit e92c60a

Browse files
committed
Merge main into develop [skip ci]
2 parents 59b68f7 + 4e37498 commit e92c60a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5783
-114
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
- main
88
- develop
99

10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
issues: write
14+
id-token: write
15+
1016
jobs:
1117
build:
1218
runs-on: ubuntu-latest
@@ -17,6 +23,7 @@ jobs:
1723
uses: actions/setup-node@v6
1824
with:
1925
node-version: 24.x
26+
registry-url: 'https://registry.npmjs.org'
2027
- run: npm install --no-package-lock
2128
name: Install dependencies
2229
- run: npm run build

.github/workflows/unit-test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
test:
11+
12+
runs-on: windows-latest
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: '24.x'
20+
21+
- name: Install dev dependencies
22+
run: npm install --no-package-lock
23+
24+
- name: Run unit tests
25+
run: npm run test

CHANGELOG.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,58 @@
1-
## [1.2.0-preview.1](https://github.com/AutomateThePlanet/appium-novawindows-driver/compare/v1.1.0...v1.2.0-preview.1) (2025-10-20)
1+
## [1.3.1](https://github.com/AutomateThePlanet/appium-novawindows-driver/compare/v1.3.0...v1.3.1) (2026-03-09)
2+
3+
### Bug Fixes
4+
5+
* add stderr encoding for PowerShell session ([a233063](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/a233063b4509e41c047fcc3603b29b944c5ac374))
6+
* fixed incorrect $pattern variable reference ([a0afceb](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/a0afceb7e682219b5e82759c52e20c59bff1225f))
7+
* fixed not being able to attach to slow-starting classic apps on session creation ([f25b000](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/f25b000533be1ef2a7c0bc350bf62a3cd1b60a45))
8+
9+
## [1.3.0](https://github.com/AutomateThePlanet/appium-novawindows-driver/compare/v1.2.0...v1.3.0) (2026-03-06)
10+
11+
### Features
12+
13+
* **commands:** add extra W3C commands ([57c654a](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/57c654a1e1e43c8a5d31ed8103aba338883efaa9))
14+
* **commands:** add support for close app and launch app ([26db919](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/26db919c17ce74ff3c5ef2776544affecb32e2fc))
15+
* **commands:** implement waitForAppLaunch and forceQuit ([6cce956](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/6cce9565ce51b9f0e354b14819f41a6fc39ffc50))
16+
* **tests:** add unit tests and missing commands - recording, deletion and click and drag ([a8989c0](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/a8989c06816b3f9b5b5de82d85895106ab062aca))
17+
18+
### Bug Fixes
19+
20+
* Bind commands to this instance (not prototype) so each driver instance uses its own powershell session ([#56](https://github.com/AutomateThePlanet/appium-novawindows-driver/issues/56)) [skip ci] ([6dc2125](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/6dc2125c505b392f100036d532326202c0a9c8d4))
21+
* **capability:** fix post run script ([97b57af](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/97b57af2fe05803ecb66548b8a32202fbe9a45e6))
22+
* **commands:** add allow-insecure check for fs operations ([4662035](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/466203585796fe08fdb4b119991363246cb00dab))
23+
* **commands:** match closeApp and launchApp implementation with appium windows driver ([073c566](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/073c566edb3528380196640eb33ee803b4fe2029))
24+
* fix bugs and implemented end to end tests ([47efa4c](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/47efa4cf00fbac2e15e07e572cdf3e4453ec1020))
25+
* lint ([fb6ebc8](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/fb6ebc83b1ed5c0fd0c5230d2948d4f5cb156b17))
26+
* **lint:** lint ([acf7271](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/acf727179dfe1380d42a33a6d38f5175b22cb90d))
27+
* **recorder:** fix screen recording ([9da1025](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/9da1025c994cb0c3221119690f01a0584b3cf333))
28+
* **recorder:** validate outputPath before rimraf ([8aa49dd](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/8aa49dd27b2b9bb54329efa0555bb5ef21dc36b5))
29+
30+
### Miscellaneous Chores
31+
32+
* **release:** 1.3.0 [skip ci] ([c29b822](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/c29b8223fc6f0435363d6207af0ab1185b811b60))
33+
34+
## [1.3.0](https://github.com/AutomateThePlanet/appium-novawindows-driver/compare/v1.2.0...v1.3.0) (2026-03-06)
35+
36+
### Features
37+
38+
* **commands:** add extra W3C commands ([57c654a](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/57c654a1e1e43c8a5d31ed8103aba338883efaa9))
39+
* **commands:** add support for close app and launch app ([26db919](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/26db919c17ce74ff3c5ef2776544affecb32e2fc))
40+
* **commands:** implement waitForAppLaunch and forceQuit ([6cce956](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/6cce9565ce51b9f0e354b14819f41a6fc39ffc50))
41+
* **tests:** add unit tests and missing commands - recording, deletion and click and drag ([a8989c0](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/a8989c06816b3f9b5b5de82d85895106ab062aca))
42+
43+
### Bug Fixes
44+
45+
* Bind commands to this instance (not prototype) so each driver instance uses its own powershell session ([#56](https://github.com/AutomateThePlanet/appium-novawindows-driver/issues/56)) [skip ci] ([6dc2125](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/6dc2125c505b392f100036d532326202c0a9c8d4))
46+
* **capability:** fix post run script ([97b57af](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/97b57af2fe05803ecb66548b8a32202fbe9a45e6))
47+
* **commands:** add allow-insecure check for fs operations ([4662035](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/466203585796fe08fdb4b119991363246cb00dab))
48+
* **commands:** match closeApp and launchApp implementation with appium windows driver ([073c566](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/073c566edb3528380196640eb33ee803b4fe2029))
49+
* fix bugs and implemented end to end tests ([47efa4c](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/47efa4cf00fbac2e15e07e572cdf3e4453ec1020))
50+
* lint ([fb6ebc8](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/fb6ebc83b1ed5c0fd0c5230d2948d4f5cb156b17))
51+
* **lint:** lint ([acf7271](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/acf727179dfe1380d42a33a6d38f5175b22cb90d))
52+
* **recorder:** fix screen recording ([9da1025](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/9da1025c994cb0c3221119690f01a0584b3cf333))
53+
* **recorder:** validate outputPath before rimraf ([8aa49dd](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/8aa49dd27b2b9bb54329efa0555bb5ef21dc36b5))
54+
55+
## [1.2.0](https://github.com/AutomateThePlanet/appium-novawindows-driver/compare/v1.1.0...v1.2.0) (2026-01-09)
256

357
### Features
458

@@ -8,8 +62,10 @@
862
### Bug Fixes
963

1064
* allow elementId with optional x/y offsets for click/hover ([2d01246](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/2d01246e009e2c7fd67165fc1d313446870021d3))
65+
* **deps:** downgrade appium peer dependency to 3.0.0-rc.2 ([98262d2](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/98262d297268cf40259946e4a52038103618f3b4))
1166
* make modifierKeys case-insensitive ([7a05300](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/7a05300ef4a0792a9c1160dfab55537c96967f08))
1267
* update ESLint config ([2e08f8d](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/2e08f8d5a1df9bf277b2c521584dddb5b0935e72))
68+
* version bump ([a872a23](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/a872a23fec5f10f692b9c61ba7f8d671f360211f))
1369

1470
### Miscellaneous Chores
1571

@@ -51,4 +107,4 @@
51107

52108
### Code Refactoring
53109

54-
* adding enums for click and updating ([89dcebf](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/89dcebfd026f7a68b4052f33fa2c928ba42162bf))
110+
* adding enums for click and updating ([89dcebf](https://github.com/AutomateThePlanet/appium-novawindows-driver/commit/89dcebfd026f7a68b4052f33fa2c928ba42162bf))

README.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,31 +516,78 @@ Position | Type | Description | Example
516516

517517
### windows: startRecordingScreen
518518

519-
To be implemented.
519+
Starts screen recording using the **bundled ffmpeg** included with the driver. There is no system PATH fallback: if the bundle is not present (e.g. driver was not installed via npm with dependencies), screen recording is not available and the driver reports a clear error.
520520

521521
### windows: stopRecordingScreen
522522

523-
To be implemented.
523+
Stops the current screen recording and returns the video (base64 or uploads to a remote path if specified).
524524

525525
### windows: deleteFile
526526

527-
To be implemented.
527+
Deletes a file on the Windows machine. Uses PowerShell `Remove-Item -Path ... -Force`. Paths containing `[`, `]`, or `?` use `-LiteralPath` for correct interpretation.
528+
529+
#### Arguments
530+
531+
Name | Type | Required | Description | Example
532+
--- | --- | --- | --- | ---
533+
path | string | yes | Absolute or relative path to the file to delete. | `C:\Temp\file.txt`
528534

529535
### windows: deleteFolder
530536

531-
To be implemented.
537+
Deletes a folder on the Windows machine. Uses PowerShell `Remove-Item -Path ... -Force` with optional `-Recurse`. Paths containing `[`, `]`, or `?` use `-LiteralPath`.
538+
539+
#### Arguments
540+
541+
Name | Type | Required | Description | Example
542+
--- | --- | --- | --- | ---
543+
path | string | yes | Absolute or relative path to the folder to delete. | `C:\Temp\MyFolder`
544+
recursive | boolean | no | If true (default), delete contents recursively. If false, only remove the folder when empty. | `true`
532545

533546
### windows: launchApp
534547

535-
To be implemented.
548+
Re-launches the application configured in the `app` session capability. The app path or App User Model ID (AUMID) must have been set when the session was created. Typically used to reopen an app after it has been closed with `windows: closeApp`.
549+
550+
This command takes no arguments.
551+
552+
#### Example
553+
554+
```javascript
555+
// Re-launch the app set in the session capability
556+
await driver.executeScript('windows: launchApp', []);
557+
```
536558

537559
### windows: closeApp
538560

539-
To be implemented.
561+
Closes the current root application window by sending a close command via the Windows UI Automation WindowPattern. Clears the root element reference in the session afterward. Throws a `NoSuchWindowError` if no active window is found.
562+
563+
This command takes no arguments.
564+
565+
#### Example
566+
567+
```javascript
568+
// Close the current app window
569+
await driver.executeScript('windows: closeApp', []);
570+
```
540571

541572
### windows: clickAndDrag
542573

543-
To be implemented.
574+
Performs a click-and-drag: move to the start position, press the mouse button, move to the end position over the given duration, then release. Start and end can be specified by element (center or offset) or by screen coordinates. Uses the same Windows input APIs as other pointer actions.
575+
576+
#### Arguments
577+
578+
Name | Type | Required | Description | Example
579+
--- | --- | --- | --- | ---
580+
startElementId | string | no* | Element ID for drag start. Use *or* startX/startY. | `1.2.3.4.5`
581+
startX | number | no* | X coordinate for drag start (with startY). | `100`
582+
startY | number | no* | Y coordinate for drag start (with startX). | `200`
583+
endElementId | string | no* | Element ID for drag end. Use *or* endX/endY. | `1.2.3.4.6`
584+
endX | number | no* | X coordinate for drag end (with endY). | `300`
585+
endY | number | no* | Y coordinate for drag end (with endX). | `400`
586+
modifierKeys | string or string[] | no | Keys to hold during drag: `shift`, `ctrl`, `alt`, `win`. | `["ctrl"]`
587+
durationMs | number | no | Duration of the move from start to end (default: 500). | `300`
588+
button | string | no | Mouse button: `left` (default), `middle`, `right`, `back`, `forward`. | `left`
589+
590+
\* Provide either startElementId or both startX and startY; and either endElementId or both endX and endY.
544591

545592
## Development
546593

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ import appiumConfig from '@appium/eslint-config-appium-ts';
88
export default defineConfig(
99
eslint.configs.recommended,
1010
...appiumConfig,
11+
{
12+
files: ['test/e2e/**/*.ts'],
13+
},
1114
);

lib/commands/actions.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,33 @@ export async function handleKeyAction(this: NovaWindowsDriver, action: KeyAction
227227
}
228228
}
229229
}
230+
231+
export async function releaseActions(this: NovaWindowsDriver): Promise<void> {
232+
if (this.keyboardState.shift) {
233+
keyUp(Key.SHIFT);
234+
keyUp(Key.R_SHIFT);
235+
this.keyboardState.shift = false;
236+
}
237+
if (this.keyboardState.ctrl) {
238+
keyUp(Key.CONTROL);
239+
keyUp(Key.R_CONTROL);
240+
this.keyboardState.ctrl = false;
241+
}
242+
if (this.keyboardState.meta) {
243+
keyUp(Key.META);
244+
keyUp(Key.R_META);
245+
this.keyboardState.meta = false;
246+
}
247+
if (this.keyboardState.alt) {
248+
keyUp(Key.ALT);
249+
keyUp(Key.R_ALT);
250+
this.keyboardState.alt = false;
251+
}
252+
for (const key of this.keyboardState.pressed) {
253+
keyUp(key);
254+
}
255+
this.keyboardState.pressed.clear();
256+
mouseUp(0);
257+
mouseUp(1);
258+
mouseUp(2);
259+
}

0 commit comments

Comments
 (0)