How to start appium server from my python code with AppiumService()?


I am running some test on real Android device. I installed APpium server via pm. I can run Appium server with Windows command line ‘appium’.

I try to start the appium server from my python code with these lines of code:
appium_service = AppiumService()

but nothing happened! I don’t get any output, no error message, no exception, nothing.

So I tried again by passing some parameters:
appium_service = AppiumService()
appium_service.start(address=‘’, p=‘4723’)

Again nothing happened!

It seems the code is waiting… or sleeping… these lines of code are at the beginning of the script… I can see some logger messages for the initialization of my webdriver… but then nothing.

Is there anyone please who can help me to debug and to make run APpium server from my code without the command line os option.


Try the code below which works for me.
service = AppiumService()
service.start(args=[’–address’, ‘localhost’, ‘-p’, ‘4723’])