For my automation scripts, I am trying to programmatically launch Appium and then run the automation codes in the Emulator (already open).
For launching Appium, I am using below code: AppiumDriverLocalService service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingDriverExecutable(new File(nodePath)).withAppiumJS(new File(appiumPath)).withIPAddress("127.0.0.1") .usingPort(4723)); service.start();
Once the Appium is successfully launched with 200 response and the capabilities are loaded, I am facing the error as "Error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported.
Please help.