

Here is my simple AppiumServer class public class AppiumServer (For complete documentation, check this link) (For complete documentation, check this link)ĪppiumDriverLocalService, we will use this to start and stop our server and also to redirect our logs to an external file. We will only be needing the usingPort() method available in this class. In our case, we will not do anything fancy with our server. It has public methods used to set or configure your Appium server. All you need are these two classes AppiumServiceBuilder and AppiumDriverLocalService available in io.appium.java_ package.ĪppiumServiceBuilder, as the class name implies, it is a builder. So the solution, start your server programmatically. We don’t want you getting disturbed on your off hours just to start the server so that your scheduled tests can execute. We don’t want to be manually starting and stopping the server every start and end of the test. As much as possible we should try to avoid manual intervention in our test execution.

That goes the same with starting our server. The thing is we are automating our tests because we want to be efficient and avoid doing the same task over and over again. And I also started with this workflow since most tutorials will only show this step. In fact this is what I do when I open the appium inspector to locate my elements. There is actually nothing wrong in doing this.
