Activity Stops searching for texts when it is closed and then again reopened from java code.
PrabhatPandey opened this issue · 1 comments
Hey renas,
I am having this strange issue :
Steps :
-
Open splash activity
-
Use solo.goBack() -> Which closes the app
-
I bring the previous activity back using the following code
Intent intent = new Intent();
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClassName("com.application.zomato","com.application.zomato.main.Home");
getInstrumentation().getTargetContext().startActivity(intent);
Now If I try to click on Texts which are presents in the visible screen. It is working fine.
But
When I try to search element which are not in the visible area( This page is scrollable ) , It does not search the text , It is only searching the text in the visible area and does not scroll down to find if the text is present or not ....
Solved it using the following code snippet .
solo.finishOpenedActivities();
setActivity(null);
solo = new Solo(getInstrumentation(), getActivity());