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
Copy file name to clipboardExpand all lines: README.md
+5-53Lines changed: 5 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,10 @@ This Github project provides:
19
19
20
20
## Getting Started
21
21
22
+
### Frequently Asked Questions
23
+
24
+
For answers to common questions and/or best practices in using WinAppDriver, please refer to our updated [FAQ page](https://github.com/Microsoft/WinAppDriver/wiki/Frequently-Asked-Questions).
> **Note**: You must run `WinAppDriver.exe` as **administrator** to listen to a different IP address and port.
42
46
43
-
### Running on a Remote Machine
44
-
45
-
Windows Application Driver can run remotely on any Windows 10 machine with `WinAppDriver.exe` installed and running. This *test machine* can then serve any JSON wire protocol commands coming from the *test runner* remotely through the network. Below are the steps to the one-time setup for the *test machine* to receive inbound requests:
46
-
47
-
1. On the *test machine* you want to run the test application on, open up **Windows Firewall with Advanced Security**
48
-
- Select **Inbound Rules** -> **New Rule...**
49
-
-**Rule Type** -> **Port**
50
-
- Select **TCP**
51
-
- Choose specific local port (4723 is WinAppDriver standard)
52
-
-**Action** -> **Allow the connection**
53
-
-**Profile** -> select all
54
-
-**Name** -> optional, choose name for rule (e.g. WinAppDriver remote)
55
-
2. Run `ipconfig.exe` to determine your machine's local IP address
56
-
> **Note**: Setting `*` as the IP address command line option will cause it to bind to all bound IP addresses on the machine
57
-
3. Run `WinAppDriver.exe` as **administrator** with command line arguments as seen above specifying local IP and port
58
-
4. On the *test runner* machine where the runner and scripts are, update the test script to point to the IP of the remote *test machine*
59
-
5. Execute the test script on the *test runner* to perform the test actions against the test application on the remote *test machine*.
60
-
61
47
62
48
## Samples
63
49
@@ -115,40 +101,6 @@ NotepadSession = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:472
115
101
NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text");
116
102
```
117
103
118
-
### Creating a Desktop Session
119
-
120
-
One test session typically corresponds to one app top level window. As long as you have your session alive, you can send input interactions and navigate the app elements tree. On a Windows 10 PC however, an app could trigger external changes such as toast notifications, app tiles, etc. In addition, some apps also respond to external events that can be triggered through the start menu or other sources. Windows Application Driver supports all these scenarios by exposing the entire desktop through a **Root** session that can be created as shown below.
In some cases, you may want to test applications that are not launched in a conventional way like shown above. For instance, the Cortana application is always running and will not launch a UI window until triggered through **Start Menu** or a keyboard shortcut. In this case, you can create a new session in Windows Application Driver by providing the application top level window handle as a hex string (E.g. `0xB822E2`). This window handle can be retrieved from various methods including the **Desktop Session** mentioned above. This mechanism can also be used for applications that have unusually long startup times. Below is an example of creating a test session for the **Cortana** app after launching the UI using a keyboard shortcut and locating the window using the **Desktop Session**.
0 commit comments