Code example for Instrumentation

Methods: getContext, sleep

0
	} 
 
	public void testgotoNextActivity() throws Exception { 
 
		Log.d(LOG_TAG, mActivity +  "----current_activity");
		Log.d(LOG_TAG, mInstr.getContext() + "----current_instrument");
		Log.d(LOG_TAG,  tmts.getCurrentActivity() + "----tear_down before finish");
		TmtsActivity c_activity = tmts.getCurrentActivity();
		//this method is ok 
//		TmtsButton btn_next = mExtendedR.getTmtsButton("btn_next"); 
		 
		//this is ok too 
		TmtsButton btn_next = (TmtsButton) mExtendedR.btn_next();
		Log.d(LOG_TAG, utils.getCurrentActivity().getClass().getSimpleName());
//		TmtsButton button = c_activity.getTmtsButton("btn_next"); 
		btn_next.click();
 
		Thread.sleep(1000);
		Log.d(LOG_TAG, utils.getCurrentActivity().getClass().getSimpleName());
		TmtsButton backButton = c_activity.getTmtsButton("btn_close");
		backButton.click();
	}