Android :java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission

前端 未结 9 1461
感动是毒
感动是毒 2020-12-01 11:48

Hi there I am new to Android Junit testing:

I have written some test code in MainActivityFunctionalTest.java file

MainActivityFunctionalTest.java:

         


        
9条回答
  •  悲哀的现实
    2020-12-01 12:42

    I had the same issue and adding the closeSoftKeyboard() method resolved it for me.

    onView(withId(R.id.view)).perform(typeText(text_to_be_typed), closeSoftKeyboard());
    

提交回复
热议问题