简体   繁体   中英

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

I need to change system language on the process of robotium test.I wrote this code in my test project of target APP and want to open morelocale to change language.

image

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

Morelocale can be opened but i can not click any view.

Exception: Text not found

Can anyone help me Or have a better solution to change system language on the test process?

Thanks in advance.

I have solved the problem by myself.

1.We don't need to open another dependensy project from one project, just need to add the dependensy project as a library into our project.

2.Make the dependensy project as a jar file and add it into our project build path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM