Implemented WinAppDriver
Trying to start Windows Application Driver C#
var p = new Process();
p.StartInfo.FileName = @"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe";
p.Start();
Error:
Address 'http://127.0.0.1:4723/' is already in use Failed to initialize: 0x80004005
Error running it Windows Application Driver c# code:
The HTTP request to the remote WebDriver server for URL http://localhost:4723/session timed out after 60 seconds.
C# Code:
var appPath = @"ApplicationPath";
var windowsApplicationDriverUrl = "http://localhost:4723";
var appiumOptions = new AppiumOptions();
appiumOptions.AddAdditionalCapability("app", appPath);
session = new WindowsDriver<WindowsElement>(new Uri(windowsApplicationDriverUrl), appiumOptions);
Run
I find the PID is for
TCP 0.0.0.0:4723 0.0.0.0:0 LISTENING 4
The System runs the PID
tasklist
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 8 K
System 4 Services 0 1,440 K
Windows Application driver doesn't run because something is already hogging the port. Is this anti-virus? How do you fix?
Ultimately decided to just run the application on another port.