bloomlkak.blogg.se

Android windows eclipse appium server run script
Android windows eclipse appium server run script




android windows eclipse appium server run script

We will pass the variable “STARTSERVER” into runtime.exec() method.

android windows eclipse appium server run script

Next step is to create an object of Runtime class which is again a java class and call the method getRuntime(), highlighted in blue. In the code highlighted in green, we added both paths into the same variable with spaces and created a method called startAppiumServer() which takes care of the Appium server startup process. We then created a start server variable and pass the path to node.exe and main.js, highlighted in yellow. In the code highlighted in red, we have called process class which is a Java class and declared it static. Starting Appium from code requires a path of two files which are kept inside the Appium folder. The third part is the main method which is necessary to execute the class and from this main method, all the above method are called. The code structure is segregated into three parts, the first part of the code starts the Appium server, the second part stops the Appium server. Now in this blog, we will understand how to start the Appium server. In the previous blog in this series, we learned how to write the first Appium script for Android devices.






Android windows eclipse appium server run script