Update steps for running WinAppDriver autonomously#1368
Conversation
The steps in the current documentation leave ambiguity for the reader to figure out setup steps in a CI/CD kind of pipeline. Adding details around batch files and Task Schedulers to run winappdriver autonomously would help automation/testing teams to setup Winappdriver in a complementary style to the CI/CD flow. @timotiusmargo @hassanuz @licanhua @kat-y @DHowett - Kindly review and approve the PR as necessary .
|
@smilinrobin Does the solution to pass the desktop session to a console session work? I have been able to connect with winappdriver on the console session but wehn clicking any element it results in the following error: |
| - *Note*: The IP address above (10.x.xx.xx) should be replaced with the local IP address of the server/remote machine | ||
| - **5.3**. Setup Batch file to logout (without disconnecting) from the remote machine : | ||
| - *Name* : logout-rdp.bat | ||
| - *Contents*: `for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (%windir%\System32\tscon.exe %%s /dest:console C:\Install\QRes.exe /x 1920 /y 1080)` |
There was a problem hiding this comment.
@licanhua - We can setup Qres (http://qres.sourceforge.net/) or another remote vnc tool to change the resolution of the target machine to match the local machine. My solution is loosely derived from here : https://stackoverflow.com/questions/35862217/screen-resolution-changes-for-the-remote-machine-after-safely-closing-the-rdp-se .
Alternatively the user can skip setting up the destination resolution with QRes .
Added note around QRes Co-authored-by: Canhua Li <canli@microsoft.com>
|
Updated commit with the notes around Qres |
DHowett
left a comment
There was a problem hiding this comment.
Thank you for this! I reworded it quite a bit.
| CalculatorResult = CalculatorSession.findElementByAccessibilityId("CalculatorResults"); | ||
| ``` No newline at end of file | ||
| ``` | ||
| 5.WinAppDriver requires the Winappdriver server to be listening on the local host or IP address in order to perform the requisite UI interactions. While Appium generally takes care of this requirement on the local , for running on a server/remote machine, we need to perform a few extra steps as Winappdriver requires a GUI Output and the Winappdriver server running in an interactive shell. |
There was a problem hiding this comment.
| 5.WinAppDriver requires the Winappdriver server to be listening on the local host or IP address in order to perform the requisite UI interactions. While Appium generally takes care of this requirement on the local , for running on a server/remote machine, we need to perform a few extra steps as Winappdriver requires a GUI Output and the Winappdriver server running in an interactive shell. | |
| 5. WinAppDriver requires the WinAppDriver server to be listening in order to perform the requisite UI interactions. While Appium generally takes care of this requirement on the local machine, running on a server/remote machine requires a few extra steps as WinAppDriver requires an interactive desktop session. |
|
Thanks @DHowett . 👍 |
|
I have setup a launch.bat file to call WinAppDriver.exe at test machine IP and port. Then Jenkins call the : At Jenkins console result: the WinAppDriver is exit automatically and cause the robot script failed. Anyone know how to configure Jenkins properly to run WinAppDriver ? |
The steps in the current documentation leave ambiguity for the reader to figure out setup steps in a CI/CD kind of pipeline.
Adding details around batch files and Task Schedulers to run winappdriver autonomously would help automation/testing teams to setup Winappdriver in a complementary style to the CI/CD flow.
@timotiusmargo @hassanuz @licanhua @kat-y @DHowett - Kindly review and approve the PR as necessary .