appium-desktop-driver 1.4.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/build/eslint.config.d.mts +3 -0
  2. package/build/eslint.config.d.mts.map +1 -0
  3. package/build/eslint.config.mjs +22 -0
  4. package/build/eslint.config.mjs.map +1 -0
  5. package/build/lib/commands/actions.d.ts +10 -10
  6. package/build/lib/commands/actions.d.ts.map +1 -1
  7. package/build/lib/commands/actions.js.map +1 -1
  8. package/build/lib/commands/app.d.ts +16 -16
  9. package/build/lib/commands/app.d.ts.map +1 -1
  10. package/build/lib/commands/app.js.map +1 -1
  11. package/build/lib/commands/device.d.ts +10 -10
  12. package/build/lib/commands/device.d.ts.map +1 -1
  13. package/build/lib/commands/device.js.map +1 -1
  14. package/build/lib/commands/element.d.ts +14 -14
  15. package/build/lib/commands/element.d.ts.map +1 -1
  16. package/build/lib/commands/element.js.map +1 -1
  17. package/build/lib/commands/extension.d.ts +39 -38
  18. package/build/lib/commands/extension.d.ts.map +1 -1
  19. package/build/lib/commands/extension.js +6 -0
  20. package/build/lib/commands/extension.js.map +1 -1
  21. package/build/lib/commands/index.d.ts +98 -89
  22. package/build/lib/commands/index.d.ts.map +1 -1
  23. package/build/lib/commands/index.js +2 -0
  24. package/build/lib/commands/index.js.map +1 -1
  25. package/build/lib/commands/powershell.d.ts +5 -5
  26. package/build/lib/commands/powershell.d.ts.map +1 -1
  27. package/build/lib/commands/powershell.js.map +1 -1
  28. package/build/lib/commands/system.d.ts +2 -2
  29. package/build/lib/commands/system.d.ts.map +1 -1
  30. package/build/lib/commands/vision.d.ts +10 -0
  31. package/build/lib/commands/vision.d.ts.map +1 -0
  32. package/build/lib/commands/vision.js +33 -0
  33. package/build/lib/commands/vision.js.map +1 -0
  34. package/build/lib/constraints.d.ts +1 -1
  35. package/build/lib/constraints.d.ts.map +1 -1
  36. package/build/lib/driver.d.ts +5 -5
  37. package/build/lib/driver.d.ts.map +1 -1
  38. package/build/lib/driver.js +3 -3
  39. package/build/lib/driver.js.map +1 -1
  40. package/build/lib/mcp/tools/index.d.ts.map +1 -1
  41. package/build/lib/mcp/tools/index.js +2 -0
  42. package/build/lib/mcp/tools/index.js.map +1 -1
  43. package/build/lib/mcp/tools/vision.d.ts +4 -0
  44. package/build/lib/mcp/tools/vision.d.ts.map +1 -0
  45. package/build/lib/mcp/tools/vision.js +76 -0
  46. package/build/lib/mcp/tools/vision.js.map +1 -0
  47. package/build/lib/util.d.ts +9 -0
  48. package/build/lib/util.d.ts.map +1 -1
  49. package/build/lib/util.js +10 -0
  50. package/build/lib/util.js.map +1 -1
  51. package/build/lib/vision-utils.d.ts +33 -0
  52. package/build/lib/vision-utils.d.ts.map +1 -0
  53. package/build/lib/vision-utils.js +90 -0
  54. package/build/lib/vision-utils.js.map +1 -0
  55. package/build/lib/winapi/user32.d.ts +1 -0
  56. package/build/lib/winapi/user32.d.ts.map +1 -1
  57. package/build/lib/winapi/user32.js +2 -3
  58. package/build/lib/winapi/user32.js.map +1 -1
  59. package/build/tsconfig.tsbuildinfo +1 -0
  60. package/package.json +11 -3
  61. package/docs/driver-demo.mp4 +0 -0
  62. package/docs/index.html +0 -582
  63. package/docs/logo.png +0 -0
  64. package/docs/mcp-demo.mp4 +0 -0
  65. package/docs/script.js +0 -69
  66. package/docs/style.css +0 -706
  67. package/npm-shrinkwrap.json +0 -5951
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-desktop-driver",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "Appium driver for Windows",
5
5
  "keywords": [
6
6
  "appium",
@@ -21,8 +21,15 @@
21
21
  "lint": "eslint .",
22
22
  "test": "npx vitest run",
23
23
  "test:e2e": "npx vitest run --config vitest.e2e.config.ts",
24
- "mcp:start": "node build/lib/mcp/index.js"
24
+ "mcp:start": "node build/lib/mcp/index.js",
25
+ "pack:dist": "node scripts/pack-dist.js"
25
26
  },
27
+ "files": [
28
+ "build",
29
+ "LICENSE",
30
+ "node_modules",
31
+ "README.md"
32
+ ],
26
33
  "author": "VeriSoft",
27
34
  "license": "Apache-2.0",
28
35
  "repository": {
@@ -36,6 +43,7 @@
36
43
  "appium": "^3.0.0-rc.2"
37
44
  },
38
45
  "dependencies": {
46
+ "@anthropic-ai/sdk": "^0.82.0",
39
47
  "@appium/base-driver": "^10.1.0",
40
48
  "@modelcontextprotocol/sdk": "^1.27.1",
41
49
  "bezier-easing": "^2.1.0",
@@ -51,7 +59,7 @@
51
59
  "platformNames": [
52
60
  "Windows"
53
61
  ],
54
- "mainClass": "NovaWindowsDriver"
62
+ "mainClass": "AppiumDesktopDriver"
55
63
  },
56
64
  "devDependencies": {
57
65
  "@appium/eslint-config-appium-ts": "^2.0.3",
Binary file
package/docs/index.html DELETED
@@ -1,582 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Appium Desktop Driver — Windows UI Automation That Actually Works</title>
7
- <meta name="description" content="A drop-in Appium 2/3 driver for Windows that outperforms WinAppDriver on speed, reliability, and modern app support." />
8
-
9
- <!-- Prism.js (syntax highlighting) -->
10
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" />
11
-
12
- <link rel="stylesheet" href="style.css" />
13
- </head>
14
- <body>
15
-
16
- <!-- ============================================================
17
- NAV
18
- ============================================================ -->
19
- <nav>
20
- <div class="nav-inner">
21
- <div class="nav-brand">
22
- <img src="logo.png" alt="VeriSoft" class="nav-logo" />
23
- Appium Desktop Driver
24
- </div>
25
- <ul class="nav-links">
26
- <li><a href="#demo">Demo</a></li>
27
- <li><a href="#features">Features</a></li>
28
- <li><a href="#mcp">MCP Server</a></li>
29
- <li><a href="#quickstart">Quick Start</a></li>
30
- <li><a href="https://github.com/verisoft-ai/appium-desktop-driver" target="_blank" rel="noopener">GitHub ↗</a></li>
31
- </ul>
32
- </div>
33
- </nav>
34
-
35
- <!-- ============================================================
36
- 1. HERO
37
- ============================================================ -->
38
- <section id="hero">
39
- <div class="container">
40
- <div class="hero-eyebrow">Appium 2 &amp; 3 compatible</div>
41
- <h1>Windows UI Automation<br><span class="accent">That Actually Works</span></h1>
42
- <p class="hero-pitch">
43
- A drop-in Appium 2/3 driver for Windows that tackles the limitations of WinAppDriver — faster XPath, layout-safe input, and no extra setup required.
44
- </p>
45
-
46
- <div class="hero-install-row">
47
- <div class="hero-install">
48
- <pre><code>npm install -g appium
49
- appium driver install --source=npm appium-desktop-driver</code></pre>
50
- </div>
51
- <a href="https://github.com/verisoft-ai/appium-desktop-driver" class="btn-primary" target="_blank" rel="noopener">
52
- <svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
53
- View on GitHub
54
- </a>
55
- </div>
56
- </div>
57
- </section>
58
-
59
- <!-- ============================================================
60
- 3. DEMO VIDEO
61
- ============================================================ -->
62
- <section id="demo">
63
- <div class="container">
64
- <p class="section-label">See it in action</p>
65
- <h2>Driver Demo</h2>
66
- <p class="section-intro">Watch the driver automate a real Windows application end-to-end — element finding, input simulation, and test execution.</p>
67
-
68
- <div class="video-outer">
69
- <div class="video-wrapper">
70
- <video autoplay muted loop playsinline controls>
71
- <source src="driver-demo.mp4" type="video/mp4" />
72
- </video>
73
- </div>
74
- </div>
75
- </div>
76
- </section>
77
-
78
- <!-- ============================================================
79
- 3. WHY NOT WINAPPDRIVER
80
- ============================================================ -->
81
- <section id="why">
82
- <div class="container">
83
- <p class="section-label">Why switch</p>
84
- <h2>Why Not WinAppDriver?</h2>
85
- <p class="section-intro">WinAppDriver is abandoned and ships known pain points. Here's what this driver does instead.</p>
86
-
87
- <div class="data-table-wrap">
88
- <table class="comparison-table">
89
- <thead>
90
- <tr>
91
- <th>Problem with WinAppDriver</th>
92
- <th>What this driver does instead</th>
93
- </tr>
94
- </thead>
95
- <tbody>
96
- <tr>
97
- <td><span class="cross">✗</span>Slow XPath on complex UIs</td>
98
- <td><span class="check">✓</span>Faster XPath via direct UIA3 tree traversal</td>
99
- </tr>
100
- <tr>
101
- <td><span class="cross">✗</span>Can't access hidden/raw elements</td>
102
- <td><span class="check">✓</span>RawView element support</td>
103
- </tr>
104
- <tr>
105
- <td><span class="cross">✗</span>Keyboard layout–dependent input</td>
106
- <td><span class="check">✓</span>Unicode-safe text input with layout bypass</td>
107
- </tr>
108
- <tr>
109
- <td><span class="cross">✗</span>Requires Developer Mode or extra setup</td>
110
- <td><span class="check">✓</span>Zero extra prerequisites — PowerShell only</td>
111
- </tr>
112
- <tr>
113
- <td><span class="cross">✗</span>No MCP / AI agent support</td>
114
- <td><span class="check">✓</span>Built-in MCP server with 30+ tools</td>
115
- </tr>
116
- </tbody>
117
- </table>
118
- </div>
119
- </div>
120
- </section>
121
-
122
- <!-- ============================================================
123
- SUPPORTED APP TYPES
124
- ============================================================ -->
125
- <section id="app-types">
126
- <div class="container">
127
- <p class="section-label">Compatibility</p>
128
- <h2>Supported App Types</h2>
129
- <p class="section-intro">Works with every Windows application framework — including legacy apps with sparse accessibility trees.</p>
130
-
131
- <div class="app-chips">
132
- <div class="app-chip"><span class="chip-icon">🪟</span>UWP (Universal Windows Platform)</div>
133
- <div class="app-chip"><span class="chip-icon">🖼️</span>WinForms</div>
134
- <div class="app-chip"><span class="chip-icon">💠</span>WPF (Windows Presentation Foundation)</div>
135
- <div class="app-chip"><span class="chip-icon">⚙️</span>Win32 / Classic Windows</div>
136
- <div class="app-chip"><span class="chip-icon">🔧</span>Legacy / accessibility-sparse apps</div>
137
- </div>
138
- </div>
139
- </section>
140
-
141
- <!-- ============================================================
142
- 4. CORE FEATURES
143
- ============================================================ -->
144
- <section id="features">
145
- <div class="container">
146
- <p class="section-label">What you get</p>
147
- <h2>Core Features</h2>
148
- <p class="section-intro">Everything you need for production-grade Windows UI automation.</p>
149
-
150
- <div class="feature-grid">
151
- <div class="feature-card">
152
- <div class="feature-icon">🔌</div>
153
- <h3>Appium 2/3 Native</h3>
154
- <p>Drop-in driver for the modern Appium stack. Familiar W3C WebDriver protocol — works with any Appium client.</p>
155
- </div>
156
- <div class="feature-card">
157
- <div class="feature-icon">⚡</div>
158
- <h3>Fast Element Finding</h3>
159
- <p>Element lookups via Windows UI Automation 3 (UIA3). XPath evaluated against the live UIA tree with RawView access for hidden elements.</p>
160
- </div>
161
- <div class="feature-card">
162
- <div class="feature-icon">🖱️</div>
163
- <h3>Rich Input Simulation</h3>
164
- <p>Mouse (click, scroll, hover, drag, Bezier easing), keyboard (unicode, virtual key codes, modifier combos), and clipboard. All via native <code>user32.dll</code> calls.</p>
165
- </div>
166
- <div class="feature-card">
167
- <div class="feature-icon">🛠️</div>
168
- <h3>Platform Extensions</h3>
169
- <p>30+ <code>executeScript</code> commands: invoke/expand/collapse/toggle UI patterns, set/get values, manage windows, control monitors, run PowerShell, record screen.</p>
170
- </div>
171
- <div class="feature-card">
172
- <div class="feature-icon">🤖</div>
173
- <h3>MCP Server</h3>
174
- <p>An out-of-the-box Model Context Protocol server (<code>desktop-driver-mcp</code>) exposes 30+ tools so AI agents can automate Windows UIs without writing traditional test scripts.</p>
175
- </div>
176
- <div class="feature-card">
177
- <div class="feature-icon">💻</div>
178
- <h3>PowerShell Escape Hatch</h3>
179
- <p>Run arbitrary PowerShell before/after sessions (<code>prerun</code>/<code>postrun</code>), inject environment variables, and execute raw scripts mid-test.</p>
180
- </div>
181
- </div>
182
- </div>
183
- </section>
184
-
185
- <!-- ============================================================
186
- 5. LOCATOR STRATEGIES
187
- ============================================================ -->
188
- <section id="locators">
189
- <div class="container">
190
- <p class="section-label">Element finding</p>
191
- <h2>Locator Strategies</h2>
192
- <p class="section-intro">All supported locators with their UIA mapping and an example selector.</p>
193
-
194
- <div class="data-table-wrap">
195
- <table class="data-table">
196
- <thead>
197
- <tr>
198
- <th>Strategy</th>
199
- <th>Maps to</th>
200
- <th>Example</th>
201
- </tr>
202
- </thead>
203
- <tbody>
204
- <tr>
205
- <td><code>accessibility id</code></td>
206
- <td>UIA AutomationId</td>
207
- <td><code>AppNameTitle</code></td>
208
- </tr>
209
- <tr>
210
- <td><code>name</code></td>
211
- <td>UIA Name</td>
212
- <td><code>Calculator</code></td>
213
- </tr>
214
- <tr>
215
- <td><code>class name</code></td>
216
- <td>UIA ClassName</td>
217
- <td><code>TextBlock</code></td>
218
- </tr>
219
- <tr>
220
- <td><code>tag name</code></td>
221
- <td>UIA ControlType</td>
222
- <td><code>Button</code></td>
223
- </tr>
224
- <tr>
225
- <td><code>xpath</code></td>
226
- <td>Live UIA tree XPath 1.0</td>
227
- <td><code>//Button[@Name="OK"]</code></td>
228
- </tr>
229
- <tr>
230
- <td><code>id</code></td>
231
- <td>Alias for accessibility id</td>
232
- <td><code>42.333896.3.1</code></td>
233
- </tr>
234
- <tr>
235
- <td><code>-windows uiautomation</code></td>
236
- <td>Raw UIA condition (C#/PS syntax)</td>
237
- <td><code>new PropertyCondition(...)</code></td>
238
- </tr>
239
- </tbody>
240
- </table>
241
- </div>
242
- </div>
243
- </section>
244
-
245
- <!-- ============================================================
246
- 6. MCP SERVER
247
- ============================================================ -->
248
- <section id="mcp">
249
- <div class="container">
250
- <p class="section-label">AI agent integration</p>
251
- <h2>MCP Server for AI Agents</h2>
252
- <p class="section-intro">
253
- Connect Claude, Copilot, or any MCP-compatible AI agent to any Windows app in minutes.
254
- </p>
255
-
256
- <div class="mcp-steps">
257
- <div class="mcp-step">
258
- <div class="step-num">1</div>
259
- <h3>Run <code>desktop-driver-mcp</code></h3>
260
- <p>Start your Appium server, then run <code>desktop-driver-mcp</code> to connect and create a session.</p>
261
- </div>
262
- <div class="mcp-step">
263
- <div class="step-num">2</div>
264
- <h3>Connect your AI client</h3>
265
- <p>Point Claude Desktop, Cursor, or any MCP-compatible client to the server via stdio transport.</p>
266
- </div>
267
- <div class="mcp-step">
268
- <div class="step-num">3</div>
269
- <h3>Let the agent work</h3>
270
- <p>The agent finds elements, clicks, types, takes screenshots, and reads the UI tree — all without you writing test code.</p>
271
- </div>
272
- </div>
273
-
274
- <!-- MCP showcase video -->
275
- <div class="video-outer mt-8">
276
- <div class="video-wrapper">
277
- <video autoplay muted loop playsinline controls>
278
- <source src="mcp-demo.mp4" type="video/mp4" />
279
- </video>
280
- </div>
281
- </div>
282
-
283
- <!-- MCP config snippet -->
284
- <div class="mt-12">
285
- <h3>MCP Config (Claude Desktop / Cursor)</h3>
286
- <div class="code-block-wrap mt-4">
287
- <pre><code class="language-json">{
288
- "mcpServers": {
289
- "windows": {
290
- "command": "desktop-driver-mcp",
291
- "args": [],
292
- "env": {
293
- "APP": "C:\\Windows\\System32\\notepad.exe"
294
- }
295
- }
296
- }
297
- }</code></pre>
298
- </div>
299
- </div>
300
-
301
- <!-- MCP tool groups -->
302
- <div class="mt-12">
303
- <h3>Tool Groups (30+ tools)</h3>
304
- <div class="data-table-wrap mt-4">
305
- <table class="data-table mcp-group-table">
306
- <thead>
307
- <tr>
308
- <th>Group</th>
309
- <th>Tools</th>
310
- <th>Description</th>
311
- </tr>
312
- </thead>
313
- <tbody>
314
- <tr>
315
- <td>Session</td>
316
- <td><code>start_session</code>, <code>get_session_info</code>, <code>end_session</code></td>
317
- <td>Lifecycle management</td>
318
- </tr>
319
- <tr>
320
- <td>Find</td>
321
- <td><code>find_element</code>, <code>find_elements</code>, <code>find_child_element</code>, <code>wait_for_element</code></td>
322
- <td>Element discovery with selector guidance</td>
323
- </tr>
324
- <tr>
325
- <td>Inspect</td>
326
- <td><code>get_element_info</code></td>
327
- <td>Reads UIA properties and returns ranked selector suggestions</td>
328
- </tr>
329
- <tr>
330
- <td>Interact</td>
331
- <td><code>click_element</code>, <code>set_value</code>, <code>clear_element</code>, <code>get_text</code>, <code>get_attribute</code>, <code>is_element_displayed</code>, <code>is_element_enabled</code></td>
332
- <td>Basic interactions</td>
333
- </tr>
334
- <tr>
335
- <td>Advanced</td>
336
- <td><code>advanced_click</code>, <code>send_keys</code>, <code>hover</code>, <code>scroll</code>, <code>click_and_drag</code></td>
337
- <td>Complex input (right-click, double-click, drag, modifier keys)</td>
338
- </tr>
339
- <tr>
340
- <td>Window</td>
341
- <td><code>take_screenshot</code>, <code>get_page_source</code>, <code>get_window_rect</code>, <code>get_window_handles</code>, <code>switch_to_window</code>, <code>maximize_window</code>, <code>minimize_window</code>, <code>restore_window</code>, <code>close_window</code>, <code>get_monitors</code></td>
342
- <td>Window &amp; screen control</td>
343
- </tr>
344
- <tr>
345
- <td>UI Patterns</td>
346
- <td><code>invoke</code>, <code>expand_element</code>, <code>collapse_element</code>, <code>toggle_element</code>, <code>scroll_into_view</code>, <code>select_element</code>, <code>get_selected_item</code>, <code>get_all_selected_items</code>, <code>add_to_selection</code>, <code>remove_from_selection</code>, <code>get_element_value</code>, <code>set_element_value</code>, <code>is_multiple_selection</code></td>
347
- <td>UIA interaction patterns</td>
348
- </tr>
349
- <tr>
350
- <td>App</td>
351
- <td><code>get_window_element</code>, <code>launch_app</code>, <code>close_app</code>, <code>get_device_time</code></td>
352
- <td>App lifecycle</td>
353
- </tr>
354
- <tr>
355
- <td>Clipboard</td>
356
- <td><code>set_clipboard</code>, <code>get_clipboard</code></td>
357
- <td>Clipboard read/write (text and images)</td>
358
- </tr>
359
- </tbody>
360
- </table>
361
- </div>
362
- </div>
363
- </div>
364
- </section>
365
-
366
- <!-- ============================================================
367
- 7. QUICK START CODE
368
- ============================================================ -->
369
- <section id="quickstart">
370
- <div class="container">
371
- <p class="section-label">Get started fast</p>
372
- <h2>Quick Start</h2>
373
- <p class="section-intro">Connect to any Windows app in under 10 lines.</p>
374
-
375
- <div class="code-block-wrap">
376
- <div class="lang-tabs">
377
- <button class="lang-tab" data-lang="python" data-active>Python</button>
378
- <button class="lang-tab" data-lang="java">Java</button>
379
- <button class="lang-tab" data-lang="js">JavaScript (WDIO)</button>
380
- <button class="lang-tab" data-lang="csharp">C#</button>
381
- </div>
382
- <div class="tabbed-code">
383
- <pre data-lang="python" data-active><code class="language-python">from appium import webdriver
384
- from appium.options.windows import WindowsOptions
385
-
386
- options = WindowsOptions()
387
- options.app = 'C:\\Windows\\System32\\notepad.exe'
388
- options.automation_name = 'DesktopDriver'
389
-
390
- driver = webdriver.Remote('http://127.0.0.1:4723', options=options)
391
-
392
- # Find and interact
393
- title_bar = driver.find_element('name', 'Notepad')
394
- driver.execute_script('windows: maximize', title_bar)</code></pre>
395
-
396
- <pre data-lang="java"><code class="language-java">import io.appium.java_client.windows.WindowsDriver;
397
- import org.openqa.selenium.remote.DesiredCapabilities;
398
- import java.net.URL;
399
-
400
- DesiredCapabilities caps = new DesiredCapabilities();
401
- caps.setCapability("platformName", "Windows");
402
- caps.setCapability("appium:automationName", "DesktopDriver");
403
- caps.setCapability("appium:app", "C:\\Windows\\System32\\notepad.exe");
404
-
405
- WindowsDriver driver = new WindowsDriver(
406
- new URL("http://127.0.0.1:4723"),
407
- caps
408
- );
409
-
410
- driver.findElementByName("Notepad").click();</code></pre>
411
-
412
- <pre data-lang="js"><code class="language-javascript">import { remote } from 'webdriverio';
413
-
414
- const driver = await remote({
415
- hostname: '127.0.0.1',
416
- port: 4723,
417
- capabilities: {
418
- platformName: 'Windows',
419
- 'appium:automationName': 'DesktopDriver',
420
- 'appium:app': 'C:\\Windows\\System32\\notepad.exe',
421
- },
422
- });
423
-
424
- const el = await driver.$('~AppNameTitle');
425
- await el.click();</code></pre>
426
-
427
- <pre data-lang="csharp"><code class="language-csharp">using OpenQA.Selenium.Appium;
428
- using OpenQA.Selenium.Appium.Windows;
429
-
430
- var options = new AppiumOptions();
431
- options.PlatformName = "Windows";
432
- options.AddAdditionalAppiumOption("automationName", "DesktopDriver");
433
- options.AddAdditionalAppiumOption("app", @"C:\Windows\System32\notepad.exe");
434
-
435
- var driver = new WindowsDriver(
436
- new Uri("http://127.0.0.1:4723"),
437
- options
438
- );
439
-
440
- driver.FindElement(MobileBy.AccessibilityId("AppNameTitle")).Click();</code></pre>
441
- </div>
442
- </div>
443
-
444
- <!-- Advanced options (collapsed) -->
445
- <details class="mt-8">
446
- <summary style="cursor:pointer; color:var(--text-muted); font-size:0.9rem; padding:8px 0;">
447
- Advanced session capabilities (Python)
448
- </summary>
449
- <div class="code-block-wrap mt-4">
450
- <pre><code class="language-python">options.smooth_pointer_move = 'ease-in-out'
451
- options.delay_before_click = 100 # ms
452
- options.app_top_level_window = 0x12345 # attach to existing window
453
- options.prerun = {'script': 'Start-Process notepad'}
454
- options.postrun = {'command': 'Stop-Process -Name notepad'}
455
- options.app_environment = {'MY_VAR': 'hello'}
456
- options.return_all_window_handles = True</code></pre>
457
- </div>
458
- </details>
459
- </div>
460
- </section>
461
-
462
- <!-- ============================================================
463
- 8. SESSION CAPABILITIES
464
- ============================================================ -->
465
- <section id="capabilities">
466
- <div class="container">
467
- <p class="section-label">Configuration</p>
468
- <h2>Session Capabilities</h2>
469
- <p class="section-intro">All supported capabilities and their defaults.</p>
470
-
471
- <div class="data-table-wrap">
472
- <table class="data-table">
473
- <thead>
474
- <tr>
475
- <th>Capability</th>
476
- <th>Type</th>
477
- <th>Default</th>
478
- <th>Description</th>
479
- </tr>
480
- </thead>
481
- <tbody>
482
- <tr><td><code>platformName</code></td><td>string</td><td>—</td><td>Must be <code>Windows</code></td></tr>
483
- <tr><td><code>automationName</code></td><td>string</td><td>—</td><td>Must be <code>DesktopDriver</code></td></tr>
484
- <tr><td><code>app</code></td><td>string</td><td>—</td><td>App path or UWP App User Model ID</td></tr>
485
- <tr><td><code>appTopLevelWindow</code></td><td>string/number</td><td>—</td><td>Attach to existing window by handle</td></tr>
486
- <tr><td><code>appArguments</code></td><td>string</td><td>—</td><td>CLI arguments for app launch</td></tr>
487
- <tr><td><code>appWorkingDir</code></td><td>string</td><td>—</td><td>Working directory for app</td></tr>
488
- <tr><td><code>smoothPointerMove</code></td><td>string</td><td>—</td><td>CSS easing for mouse movement (e.g. <code>ease-in</code>)</td></tr>
489
- <tr><td><code>delayBeforeClick</code></td><td>number</td><td>—</td><td>ms delay before each click</td></tr>
490
- <tr><td><code>delayAfterClick</code></td><td>number</td><td>—</td><td>ms delay after each click</td></tr>
491
- <tr><td><code>shouldCloseApp</code></td><td>boolean</td><td><code>true</code></td><td>Close app window when session ends</td></tr>
492
- <tr><td><code>prerun</code></td><td>object</td><td>—</td><td><code>{script: '...'}</code> or <code>{command: '...'}</code> to run before session</td></tr>
493
- <tr><td><code>postrun</code></td><td>object</td><td>—</td><td>Same as prerun, runs after session</td></tr>
494
- <tr><td><code>isolatedScriptExecution</code></td><td>boolean</td><td><code>false</code></td><td>Run PowerShell scripts in isolated scope</td></tr>
495
- <tr><td><code>appEnvironment</code></td><td>object</td><td>—</td><td>Custom env vars injected into PS session</td></tr>
496
- <tr><td><code>returnAllWindowHandles</code></td><td>boolean</td><td><code>false</code></td><td>Return all top-level windows (not just app's)</td></tr>
497
- <tr><td><code>ms:waitForAppLaunch</code></td><td>number</td><td>0</td><td>Seconds to wait for app window after launch</td></tr>
498
- <tr><td><code>ms:windowSwitchRetries</code></td><td>number</td><td>20</td><td>Retry count for <code>setWindow()</code></td></tr>
499
- <tr><td><code>ms:windowSwitchInterval</code></td><td>number</td><td>500</td><td>ms between <code>setWindow()</code> retries</td></tr>
500
- </tbody>
501
- </table>
502
- </div>
503
- </div>
504
- </section>
505
-
506
- <!-- ============================================================
507
- 9. EXECUTESCRIPT EXTENSIONS
508
- ============================================================ -->
509
- <section id="extensions">
510
- <div class="container">
511
- <p class="section-label">Platform commands</p>
512
- <h2><code>executeScript</code> Extensions</h2>
513
- <p class="section-intro">All <code>windows:</code> commands grouped by category.</p>
514
-
515
- <div class="ext-groups">
516
- <div class="ext-group">
517
- <h3>Mouse &amp; Keyboard</h3>
518
- <ul>
519
- <li><code>windows: click</code> — advanced click with modifier keys, multi-click, duration</li>
520
- <li><code>windows: scroll</code> — mouse wheel (horizontal or vertical)</li>
521
- <li><code>windows: hover</code> — mouse move from A to B</li>
522
- <li><code>windows: keys</code> — keyboard input (text, virtual key codes, modifiers)</li>
523
- <li><code>windows: clickAndDrag</code> — click-press-move-release drag</li>
524
- </ul>
525
- </div>
526
-
527
- <div class="ext-group">
528
- <h3>UI Patterns</h3>
529
- <ul>
530
- <li><code>windows: invoke</code>, <code>windows: expand</code>, <code>windows: collapse</code></li>
531
- <li><code>windows: toggle</code>, <code>windows: setValue</code>, <code>windows: getValue</code></li>
532
- <li><code>windows: select</code>, <code>windows: addToSelection</code>, <code>windows: removeFromSelection</code></li>
533
- <li><code>windows: selectedItem</code>, <code>windows: allSelectedItems</code>, <code>windows: isMultiple</code></li>
534
- <li><code>windows: scrollIntoView</code>, <code>windows: setFocus</code></li>
535
- </ul>
536
- </div>
537
-
538
- <div class="ext-group">
539
- <h3>Window Management</h3>
540
- <ul>
541
- <li><code>windows: maximize</code>, <code>windows: minimize</code>, <code>windows: restore</code>, <code>windows: close</code></li>
542
- <li><code>windows: getMonitors</code> — multi-monitor info</li>
543
- <li><code>windows: getWindowElement</code> — root element of current window</li>
544
- <li><code>windows: launchApp</code>, <code>windows: closeApp</code></li>
545
- </ul>
546
- </div>
547
-
548
- <div class="ext-group">
549
- <h3>System</h3>
550
- <ul>
551
- <li><code>windows: setClipboard</code>, <code>windows: getClipboard</code></li>
552
- <li><code>windows: startRecordingScreen</code>, <code>windows: stopRecordingScreen</code></li>
553
- <li><code>windows: deleteFile</code>, <code>windows: deleteFolder</code></li>
554
- <li><code>windows: pushCacheRequest</code> — UIA RawView element caching</li>
555
- </ul>
556
- </div>
557
- </div>
558
- </div>
559
- </section>
560
-
561
- <!-- ============================================================
562
- FOOTER
563
- ============================================================ -->
564
- <footer>
565
- <div class="footer-inner">
566
- <span>Built by <a href="https://verisoft.ai" target="_blank" rel="noopener"><img src="logo.png" alt="VeriSoft" class="footer-logo" /></a> · Apache 2.0</span>
567
- <ul class="footer-links">
568
- <li><a href="https://github.com/verisoft-ai/appium-desktop-driver" target="_blank" rel="noopener">GitHub</a></li>
569
- <li><a href="https://www.npmjs.com/package/appium-desktop-driver" target="_blank" rel="noopener">npm</a></li>
570
- <li><a href="https://github.com/verisoft-ai/appium-desktop-driver/issues" target="_blank" rel="noopener">Issues</a></li>
571
- <li><a href="https://github.com/verisoft-ai/appium-desktop-driver/blob/main/LICENSE" target="_blank" rel="noopener">License</a></li>
572
- </ul>
573
- </div>
574
- </footer>
575
-
576
- <!-- Prism.js (syntax highlighting) -->
577
- <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
578
- <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
579
-
580
- <script src="script.js"></script>
581
- </body>
582
- </html>
package/docs/logo.png DELETED
Binary file
package/docs/mcp-demo.mp4 DELETED
Binary file