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
@@ -25,7 +24,7 @@ Beside of standard Appium requirements NovaWindows Driver adds the following pre
25
24
26
25
> **Note**
27
26
>
28
-
> The driver is currently uses a PowerShell session as a back-end, and
27
+
> The driver currently uses a PowerShell session as a back-end, and
29
28
> should not require Developer Mode to be on, or any other software.
30
29
> There's a plan to update to a better, .NET-based backend for improved
31
30
> realiability and better code and error management, as well as supporting
@@ -44,6 +43,11 @@ delayBeforeClick | Time in milliseconds before a click is performed.
44
43
delayAfterClick | Time in milliseconds after a click is performed.
45
44
appTopLevelWindow | The handle of an existing application top-level window to attach to. It can be a number or string (not necessarily hexadecimal). Example: `12345`, `0x12345`.
46
45
shouldCloseApp | Whether to close the window of the application in test after the session finishes. Default is `true`.
46
+
appArguments | Optional string of arguments to pass to the app on launch.
47
+
appWorkingDir | Optional working directory path for the application.
48
+
prerun | An object containing either `script` or `command` key. The value of each key must be a valid PowerShell script or command to be executed prior to the WinAppDriver session startup. See [Power Shell commands execution](#power-shell-commands-execution) for more details. Example: `{script: 'Get-Process outlook -ErrorAction SilentlyContinue'}`
49
+
postrun | An object containing either `script` or `command` key. The value of each key must be a valid PowerShell script or command to be executed after WinAppDriver session is stopped. See [Power Shell commands execution](#power-shell-commands-execution) for more details.
50
+
isolatedScriptExecution | Whether PowerShell scripts are executed in an isolated session. Default is `false`.
47
51
48
52
Please note that more capabilities will be added as the development of this driver progresses. Since it is still in its early stages, some features may be missing or subject to change. If you need a specific capability or encounter any issues, please feel free to open an issue.
49
53
@@ -103,8 +107,7 @@ key to the listof enabled insecure features. Refer to [Appium Security document]
103
107
It is possible to ether execute a single Power Shell command or a whole script
104
108
and get its stdout in response. If the script execution returns non-zero exit code then an exception
105
109
is going to be thrown. The exception message will contain the actual stderr. Unlike, Appium Windows Driver,
106
-
there is no difference if you paste the script with `command` or `script` argument. For ease of use, you
107
-
can even pass the script as a string only, it will work the same way.
110
+
there is no difference if you paste the script with `command` or `script` argument. For ease of use, you can pass the script as a string when executing a PowerShell command directly via the driver. Note: This shorthand does not work when using the prerun or postrun capabilities, which require full object syntax.
108
111
Here's an example code of how to control the Notepad process:
this.log.info(`Failed to locate window. Sleeping for 500 milliseconds and retrying... (${i}/20)`);// TODO: make a setting for the number of retries or timeout
126
+
this.log.info(`Failed to locate window with name '${name}'. Sleeping for 500 milliseconds and retrying... (${i}/20)`);// TODO: make a setting for the number of retries or timeout
113
127
awaitsleep(500);// TODO: make a setting for the sleep timeout
114
128
}
115
129
@@ -136,12 +150,14 @@ export async function changeRootElement(this: NovaWindowsDriver, pathOrNativeWin
this.log.debug(`Detected the following native window handles for the given process IDs: ${nativeWindowHandles.map((handle)=>`0x${handle.toString(16).padStart(8,'0')}`).join(', ')}`);
this.log.info(`The window with handle 0x${nativeWindowHandles[0].toString(16).padStart(8,'0')} is not yet available in the UI Automation tree. Sleeping for 500 milliseconds and retrying... (${i}/20)`);// TODO: make a setting for the number of retries or timeout
213
+
awaitsleep(500);// TODO: make a setting for the sleep timeout
0 commit comments