Instead of calling the endpoint, we first checks if the WinAppDriver process is running on the machine, and only start it if not. This allows us to transparently launch the server on local machines from the swift code, but launch it from the GitHub actions on the CI, as we are finding issues with launching a process on the GitHub machines (Linear issue?)
This change also brings a couple Windows process/hwnd helper functions together in WindowsUtilities.swift.
This change is a different take on WIN-585 than PR https://github.com/thebrowsercompany/webdriver-swift/pull/20 to work around the crash in
URLSession.shared.dataTask
when the endpoint does not exist (Linear issue# ?)Instead of calling the endpoint, we first checks if the WinAppDriver process is running on the machine, and only start it if not. This allows us to transparently launch the server on local machines from the swift code, but launch it from the GitHub actions on the CI, as we are finding issues with launching a process on the GitHub machines (Linear issue?)
This change also brings a couple Windows process/hwnd helper functions together in WindowsUtilities.swift.
WIN-585