如何使用selenium在appium中自动从应用介绍页面切换到主页
我是阿皮姆·安德里奥德的新手。为一个应用程序编写脚本。在这种情况下,我必须将应用程序介绍页面切换到主要登录活动。如何做到这一点?您可以开始新的活动,如下所示 1。创建活动类对象如何使用selenium在appium中自动从应用介绍页面切换到主页,appium,appium-android,Appium,Appium Android,我是阿皮姆·安德里奥德的新手。为一个应用程序编写脚本。在这种情况下,我必须将应用程序介绍页面切换到主要登录活动。如何做到这一点?您可以开始新的活动,如下所示 1。创建活动类对象 Activity activity = new Activity("app package goes here", "app activity goes here"); 2。将对象传递到startActivity方法 driver.startActivity(activity); 3。如果需要,您可以根
Activity activity = new Activity("app package goes here", "app activity goes here");
2。将对象传递到startActivity方法
driver.startActivity(activity);
3。如果需要,您可以根据appPackage或appActivity名称添加等待
activity.setWaitAppPackage("app wait package goes here");
activity.setWatAppActivity("app wait activity goes here");
@Test
public void startActivityInThisAppTestCase() {
Activity activity = new Activity("app package goes here",
"app activity goes here");
driver.startActivity(activity);
assertEquals(driver.currentActivity(),
"app switched activity goes here");
}您需要切换应用程序还是只需要切换应用程序的屏幕?