Click on not fully visible imageButton with Espresso

前端 未结 7 1196
臣服心动
臣服心动 2021-01-31 09:05

I have a custom ImageButton that is not fully visible, by design, so when I perform a click action I get this error:

android.support.test.espresso.P         


        
7条回答
  •  無奈伤痛
    2021-01-31 09:40

    You have to scroll to the button before:

    onView(withId(R.id.button_id)).perform(scrollTo(), click());
    

提交回复
热议问题