Why does WinAppDriver.exe close immediately?

假如想象 提交于 2019-12-07 15:52:11

问题


I have been struggling to get anything working with WinAppDriver. It's a way of using Selenium to to test window applications.

As per the instructions below, I have installed WinAppDriver. When you run it, it should stay open in a command window. Mine does not stay open however and that is the problem.

My Question is why does WinAppDriver close immediately when I navigate to "C:\Program Files (x86)\Windows Application Driver" and run (Open) it from it? I have tried right clicking and choosing "Run as administrator" and the same thing happens.

I have spoken to IT support and they checked that anti virus wasn't blocking it.

The demo video I am following is here and WinAppDriver is installed from here and it needs to be running. When running it opens a CMD window which says "Wi8ndow Application Driver listening for requests at: http://127.0.0.1:4723/ Press ENTER to exit.". You can see in the video at about 5:30, they launch WinAppDriver.exe and the CMD window opens and stay open. What possible reasons are there that mine closes immediately?

Installing and Running Windows Application Driver

1.Download Windows Application Driver installer from https://github.com/Microsoft/WinAppDriver/releases

2.Run the installer on a Windows 10 machine where your application under test is installed and will be tested

3.Run WinAppDriver.exe from the installation directory (E.g. C:\Program Files (x86)\Windows Application Driver)


回答1:


The answer in my case was to set "Developer Mode". Just go to the Start menu and type "Use Developer Features". Set "Developer mode" to On and agree to the instal etc. Nobody told me this stuff in the tutorials...




回答2:


Another reason might be that you already have Appium server running in the background on the same port. To be sure, open cmd.exe first and paste the link to WinAppDriver.exe, then press "Enter".



来源:https://stackoverflow.com/questions/53007142/why-does-winappdriver-exe-close-immediately

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!