Hello, I’m new, learning to use appium on C#, I’m having trouble initializing the appium server as follows: The local appium server has not been started. OpenQA.Selenium.Appium.Service.Exceptions.AppiumServerHasNotBeenStartedLocallyException: ‘The local appium server has not been started. The given Node.js executable: C:\Program Files\nodejs\node.exe Arguments: “C:\Users\Vinh pc xeon\AppData\Roaming\npm\node_modules\appium\build\lib\main.js” – port 4723 --address 127.0.0.1.
Time 50000 ms for the service starting has been expired!’
Someone help me fix it.
Here is my code.
int port = 4723;
AppiumServiceBuilder builder = new AppiumServiceBuilder()
.WithAppiumJS(new FileInfo("C:\\Users\\Vinh pc xeon\\AppData\\Roaming\\npm\\node_modules\\appium\\build\\lib\\main.js"))
.UsingPort(port)
.WithIPAddress("127.0.0.1")
.WithStartUpTimeOut(TimeSpan.FromSeconds(50));
AppiumLocalService service = builder.Build();
service.Start();