startActivity() is not working in latest appium version

startActivity() is missing in appium java client 9.0.0, so unable to switch between application. Could you please assist me on this?

https://javadoc.io/doc/io.appium/java-client/latest/io/appium/java_client/android/StartsActivity.html

You are wrong. You just need cast AndroidDriver.

1 Like

It’s not working, please check the in below appium version.

io.appium java-client 9.0.0

I got the alternative way to switch the activity :

driver.executeScript(“mobile: startActivity”, ImmutableMap.of(“intent”, “com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity”));

1 Like