Open zhou9584 opened 2 years ago
What are you trying to achieve?
if you are using azure pipeline there is a task to start and stop winappdriver. Also appium supports windows automation using winappdriver under the hood.
Windows services run in session 0, which is non-interactive/headless. This means that you cannot do any UI/visual interactions, because there is nothing to interact with. Out of interest, why do you want to run it as a service?
Windows services run in session 0, which is non-interactive/headless. This means that you cannot do any UI/visual interactions, because there is nothing to interact with. Out of interest, why do you want to run it as a service?
Thanks for your comment. We build a mobile test infrastructure, and the architecture of the infrastructure is 1 center -> n agents. The agents are used to run test cases. We want to register the main process of agents as a Windows service to make sure it can be started automatically after PC rebooting caused by system update or other reason.
if you are using azure pipeline there is a task to start and stop winappdriver. Also appium supports windows automation using winappdriver under the hood.
We want to decouple the test infrastructure with ADO and the ADO will not connect with our agents directly. The ADO can trigger a test task in test center by Gradle plugin or ADO extension. Then, the center distributes task to targeted agents.
2. WinAppDriver
BTW, the WinAppDriver will started by the main process of agents, so it will be a child process of Windows service
By agent do you mean an Azure pipelines agent? AFAIK the agent service can instead also be run (and should be if you want to do UI automation) as an interactive process (i.e. headful).
If this is not possible or not what you want, you can simply let the agent configure a startup script which automatically starts WinAppDriver.
Start WinAppDriver
Use WinAppDriver by REST API
Scenario 1: Create root session
Meet error when get screenshot
Scenario 2: Create WinApp session