App Activity - can't control

Hello, friends!

I’m testing native app. My app have several activites:

ru.zzz.app.mobile.ui.screen.login.auth.AuthActivity - this is login page
ru.zzz.app.mobile.ui.screen.MainActivity - this is main page

My first test emulate login process. I set Capability (appActivity) to ru.zzz.app.mobile.ui.screen.login.auth.AuthActivity. When login test finished, i’m launching next one but it doesn’t work because new activity is launched (ru.zzz.app.mobile.ui.screen.MainActivity).

I’m launching tests form JUnt tests suites.

How can i switch to another activity from test?

Im using Appium java client 5.0.2, JUnit and Junit test suites.

Thanks

can anyone help?

Im getting error when trying to run driver.currentActivity() or driver.getCurrentPackage();

Appium log says:

Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: 404 - “”

Use:

driver.startActivity(new Activity(androidPackage, androidStartActivity));