Open kevin306 opened 2 years ago
Interactive mode should be ON for Microsoft hosted agents also.
You mean by default it should be on, or I need to enable this myself somehow?
@kevin306 let me know if it works with the link that I provided.
@anunay1 But that is for a self hosted agent right. It seems like from log from winappdriver stop
that the driver never started. Is it installed by default on microsoft hosted agents?
no you need to use the below task to install WinAppDriver https://marketplace.visualstudio.com/acquisition?itemName=WinAppDriver.winappdriver-pipelines-task
Yes so as I mentioned above I have that installed already and is in my yaml
- task: Windows Application Driver@0
inputs:
OperationType: 'Start'
AgentResolution: '1080p'
- task: VSTest@2
displayName: 'UI Tests'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '$(Build.SourcesDirectory)\**\**\*test.dll'
searchFolder: '$(Build.SourcesDirectory)'
platform: '$(platform)'
configuration: '$(configuration)'
continueOnError: true
- task: Windows Application Driver@0
inputs:
OperationType: 'Stop'
And I am using windows-latest
as image which I understand has everything setup already to run ui testing correct?
any updates on this?
@kevin306 What Hosted Agent specification are you using? It is working for me on Hosted Agent 2019, but for tasks configured via UI. Do you have the same issue if you configured the pipeline via UI (not yaml)?
@Shakevg I am using Microsoft Hosted windows-latest
which seems to be alias for Windows Server 2019 with Visual Studio 2019
. I am not sure what you mean by pipeline via UI?
@kevin306 what @Shakevg means is are you creating the pipeline using the classic method where in you can choose the task using UI or importing a yaml file..
@anunay1 You mean like this
For the winappdriver
I added using the UI but for others I have just edited the yaml and pushed my branch.
As you can see the driver appears to start in this task.
But in the stop task it complains there is no such process.
This leads me to believe it is stopping immediately.
Instead of using the task provided by azure, I ran a powershell command to start driver:
- powershell: |
start-process -NoNewWindow -FilePath 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe' -ArgumentList "4723"
displayName: 'WinApp Driver Start'
workingDirectory: '$(Build.SourcesDirectory)'
and as I suspected it is exiting immediately
Is the developer mode set to ON?
@anunay1 This is a microsoft hosted agent, so everything should be set up to run the driver automatically.
@kevin306 Per documentation WInAppDriver should be installed and works on Hosted Agent https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml Try post ticket to Microsoft, I suppose this is an issue with your agent.
Any update on this? I am hitting the same issue...
Same issue here
Can you share the yaml pipeline?
Can you share the yaml pipeline?
Adding this in the yaml solved it for me
pool: vmImage: 'windows-latest'
I'm unable to successfully run the driver in my azure dev ops env. Getting this error when trying to run my tests after enabling winappdriver task.
error: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/session. The status of the exception was UnknownError, and the message was: No connection could be made because the target machine actively refused it. No connection could be made because the target machine actively refused it
I am using a Microsoft hosted agent and yaml looks like:
My understanding is for Microsoft hosted agents it should work out of the box but output from winappdriver stop task says it never started.
Unable to close WinAppDriver.exe due to process not found. WinAppDriver already not running?
I saw some people mentioning setting interactive mode on the agent but is this required for microsoft hosted ones?