How to start Appium using python code

Start Appium in Non GUI mode using python

Some times we may need to run our mobile automation tests in different node/vm other than your local machine. So to carry out the automation tests it needs some time and effort to start the appium every time you run the tests. So to avoid manual effort, simplifying the things and speed up the process it is advised to start the appium in Non GUI mode.


How to start appium non GUI mode using Python

Prerequisites:

Install Node
Install Appium


We are going to invoke appium non GUI mode using terminal app. I use the following command to invoke the appium non GUI mode from terminal

appium --address 127.0.0.1 --port 4723

Appium usually runs on port 4723



If you open terminal in mac and type the above command, it will trigger the appium non GUI mode provided you have the prerequisites. You can try.

Let see using python code:

import appscript

appscript.app('terminal').do_script('appium --address 127.0.0.1 --port 4723')



Then you can see a new terminal window opened and Appium is running as shown in the below picture



If you see the same, it means the appium non GUI mode is started and running successfully.

Comments