public static void startServer(){
log.info("Building and starting the server:");
builder = new AppiumServiceBuilder();
builder.usingPort(APPIUM_PORT);
builder.withCapabilities(capabilities);
builder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
builder.withArgument(GeneralServerFlag.LOG_LEVEL, "error");
service = AppiumDriverLocalService.buildService(builder);
service.start();
log.info("Server started on Port - " + APPIUM_PORT);
}
In this where you have mentioned the path for Node.js and Appium.js path pls,advice me, below is the my previous code for your refernce,
DriverService service = new AppiumServiceBuilder()
.usingDriverExecutable(new File(“D:/nodejs/node.exe”))
.withAppiumJS(new File(“C:/Program Files (x86)/nodejs/node.exe”))
.withIPAddress(host.split("//")[1])
.usingPort(port)
.withLogFile(new File(“D:/web_selenium”))
.build();
service.start();