microsoft / WinAppDriver

Windows Application Driver
MIT License
3.66k stars 1.4k forks source link

WinAppDriver in Github actions yaml example #1722

Open EdeBont opened 2 years ago

EdeBont commented 2 years ago

Is there an yaml actions example file on how to use WinAppDriver in a Github CI/CD pipeline? Cannot get it running on the Github hosted runner, though it is pre installed.

anunay1 commented 2 years ago

What is the error that you get?

EdeBont commented 2 years ago

What is the error that you get?

After adding the following to my yaml file it seems to activate winappdriver at least:

Run Winappdriver

- name: Run Winappdriver
  run: Start-Process -FilePath "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"

Now this error message is generated: OpenQA.Selenium.WebDriverException : The system cannot find the file specified

So I'm still not sure I'm using winappdriver in the correct way in my workflow file. An example file would be great!

Shakevg commented 2 years ago

@EdeBont Do you know what is WinAppDriver version is installed, is it x64? The latest WinAppDriver has an x64 version and it installs in another folder "C:\Program Files\Windows Application Driver\WinAppDriver.exe"

EdeBont commented 2 years ago

@EdeBont Do you know what is WinAppDriver version is installed, is it x64? The latest WinAppDriver has an x64 version and it installs in another folder "C:\Program Files\Windows Application Driver\WinAppDriver.exe"

I am trying to use the pre installed winappdriver on the Github VM, I suppose it has the latest version installed. Do you have an example yaml file for me?

edit: Changed the path to the WinAppDriver.exe and that didn't work. Apparently the x64 version is not the one which is pre installed, so I reverted back to (x86).

Shakevg commented 2 years ago

Per documentation it has WinAppDriver 1.2.2009.02003 https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software

It is not simple to create such task. You can try to look on example here https://github.com/microsoft/WinAppDriver/issues/846 Something like: cmd start /K "C:/Program Files (x86)/Windows Application Driver/WinAppDriver.exe" 4723

khapuhetti commented 2 years ago

I also would love to see an example for github actions on how to test an .exe windows app using Winappdriver. Can't find any examples for github actions.