C# code to open terminal on Mac and start Appium

I have seen this question come up earlier but not answered for what I am looking for. I know writing appium will start appium. I would like to see if anyone has the C# code for how to start the Mac Terminal and write the npm appium command. I have a setup with:
[Setup]
public void Setup()
var driverOption = new AppiumOptions();
driverOption.AddAdditionalCapability(MobileCapabilityType.PlatformName, “iOS”);
driverOption.AddAdditionalCapability(MobileCapabilityType.PlatformVersion, “14.4”);
driverOption.AddAdditionalCapability(MobileCapabilityType.DeviceName, “name”);
driverOption.AddAdditionalCapability(MobileCapabilityType.App, “app”);
driverOption.AddAdditionalCapability(MobileCapabilityType.AutomationName, “XCUITest”);
driverOption.AddAdditionalCapability(MobileCapabilityType.Udid, “udid”);
Developer");
_IOSdriver = new IOSDriver(new Uri(“http://xxx.xxx.xx.xxx:4723/wd/hub”), driverOption);

1 Like

Using a .NET language on a posix platform will always put you in unknown territory. Is there a specific reason you are using NUnit or whatever F/W that is in C#?

Also not sure why you are building the capabilities dictionary like that, is that from example source code?

C#? Probably not worth trying. Best way? Applescript, as detailed here:

https://stackoverflow.com/questions/4404242/programmatically-launch-terminal-app-with-a-specified-command-and-custom-colors