如何在 android 中进行 robotium 测试时从一个项目中打开另一个项目

How to open another project from a project while doing robotium test in android

我需要在robotium进程上更改系统语言test.I在我的目标APP测试项目中写了这段代码,想打开morelocale来更改语言。

image

Intent launchIntent = getActivity().getPackageManager().getLaunchIntentForPackage("jp.co.c_lis.ccl.morelocale");
getActivity().startActivity(launchIntent);
solo.clickOnText("Custom Locale");

Morelocale 可以打开,但我无法单击任何视图。

Exception: Text not found

任何人都可以帮助我或者有更好的解决方案来更改测试过程中的系统语言吗?

提前致谢。

我已经自己解决了这个问题。

1.We不需要从一个项目中打开另一个依赖项目,只需要将依赖项目作为库添加到我们的项目中即可。

2.Make 将依赖项目作为 jar 文件并将其添加到我们的项目构建路径中。