click a button . unlike routertestutils #mousesingleclickview this directly accessesthe view and does not send motion events though the message queue . as such it does n't require the view to have been created by the instrumented activity , but gives less flexibility than mousesingleclickview . for example , if the view is hierachical , then clickbutton will always act on specified view , whereas mousesingleclickview will send the events to the appropriate child view . it is hence only really appropriate for simple views such as buttons . concode_field_sep String TAG concode_field_sep View waitForView concode_elem_sep View waitForRouteButton concode_elem_sep Dialog waitForDialog concode_elem_sep void mouseSingleClickView concode_elem_sep void mouseSingleClickView concode_elem_sep void mouseSingleClick concode_elem_sep Dialog getDialog concode_elem_sep void sendMouseAction
void function ( final View arg0 ) { ThreadUtils . runOnUiThreadBlocking ( new Runnable ( ) { @ Override public void run ( ) { arg0 . post ( new Runnable ( ) { @ Override public void run ( ) { arg0 . performClick ( ) ; } } ) ; } } ) ; }