Thanks for the response. I am using below code to set capabilities through script.
def Initialize():
global driver
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '6.0.1'
desired_caps['deviceName'] = '03157df33b83e813'
desired_caps['appPackage'] = 'package name'
desired_caps['appActivity'] = ' activity name'
driver = webdriver.Remote('http://localhost:4726/wd/hub', desired_caps)
return driver
post initialisation, i do some actions on this application. Now, i want to restart the application continue with some more actions on this application. So, how do i handle the restart of application through code ? Do i need to quit driver & then reinitialise again ( using : driver = webdriver.Remote('http://localhost:4726/wd/hub', desired_caps) ?
Hope my explanation is clear!