How to start arbitrary activity

The android app I’m testing launches the ‘login page’ when the shortcut of the app is pressed. This is also the page that is launched when I start the app via Appium.

I would like Appium to launch the signup page, rather than the login page, on start up. I tried to do this using the ‘start_activity’ method, but it didn’t work. Here is my Python code…

Information about the phone; all tests use this dictionary…

desired_caps = {}
desired_caps[‘platformName’] = ‘Android’
desired_caps[‘platformVersion’] = ‘7.1’
desired_caps[‘deviceName’] = ‘00d7c51cd981c8d1’

Returns abs path relative to this file and not cwd

#desired_caps[‘app’] = os.path.abspath(os.path.join(os.path.dirname(file),‘apps/208.apk’))
desired_caps[‘appPackage’] = ‘magicalconnect.android.magical.dev’
desired_caps[‘appActivity’] = ‘com.android.magical.Presentation.SignUpActivity’

self.phone = webdriver.Remote(‘http://localhost:4723/wd/hub’, desired_caps)
self.phone.start_activity(‘magicalconnect.android.magical.dev’,‘.SignUpActivity’)

This is the error i get

> E       selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity

> ..\..\appdata\local\programs\python\python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py:192: WebDriverException