Using C# .Net to programmatically build and start appium
AppiumLocalService got this
public Uri ServiceUrl => new Uri($“http://{IP.ToString()}:{Convert.ToString(Port)}/wd/hub”);
which makes ServiceUrl - “http://127.0.0.1:4723/wd/hub”
Then it times out as the serviceUrl is incorrect
But my Appium server got only
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
There’s not really enough information here to know what’s wrong. But it sounds like you are using Appium V1.x I’d suggest moving to version 2 as 1 is no longer supported as far as I know. Appium 2 doesn’t require the wd/hub.
I son’t use AppiumServiceBuilder myself but I did some quick research.
I think you need to set the base path argument. Seems like it’s defaulting to /wd/hub Try something like this:
var b = new AppiumServiceBuilder();
OptionCollector argCollector = new OptionCollector().AddArguments(new KeyValuePair<string, string>("--base-path", "/"));
var localService = b.WithIPAddress("127.0.0.1").WithArguments(argCollector);
I don’t have time to try it out myself so you may need to modify a little.