Code example for Instrumentation

Methods: getContext

0
	public void testMyCartChekoutTest(Instrumentation instrumentation)
			throws TestException { 
		try{ 
			Log.i(TAG, "------It is testMyCartChekoutTest()-----------");
			android=new AndroidHybridDataJava();
			android.parser(instrumentation.getContext());
			data=new UserInfoConstants();
			data.parser(instrumentation.getContext());
			activityName = soloMain.getCurrentActivity().getClass().getSimpleName();
			if(activityName.equalsIgnoreCase("My Cart"))
			  { 
				Log.i(TAG, "------It is MyCartChekoutTest-----------" + activityName);
				soloMain.waitForActivity("My Cart", 2000);
				for (int i = 0; i < 40; i++) 
				    { 
					activityName = soloMain.getCurrentActivity()
							.getClass().getSimpleName(); 
					if (activityName.equalsIgnoreCase("My Cart")) {
 
						Log.i(TAG, "------for()-- loop-----");
						break;