Sha256: c5af33b524728e6f4b8d7988786b7bfa7ffe4cb491d9c46b4fe5256477603929

Contents?: true

Size: 864 Bytes

Versions: 125

Compression:

Stored size: 864 Bytes

Contents

package sh.calaba.instrumentationbackend.actions.view;

import sh.calaba.instrumentationbackend.InstrumentationBackend;
import sh.calaba.instrumentationbackend.Result;
import sh.calaba.instrumentationbackend.actions.Action;
import android.app.Activity;
import android.app.TabActivity;

/**
 * @author Nicholas Albion
 */
@SuppressWarnings("deprecation")
public class GetActivityName implements Action {

	@Override
	public Result execute(String... args) {
		Activity currentActivity = InstrumentationBackend.solo.getCurrentActivity();
		
		Result result = new Result(true, currentActivity.getClass().getSimpleName());
		
		if( currentActivity instanceof TabActivity ) {
			result.addBonusInformation( ((TabActivity)currentActivity).getTabHost().getCurrentTabTag() );
		}
		
		return result;
	}

	@Override
	public String key() {
		return "get_activity_name";
	}
}

Version data entries

125 entries across 125 versions & 2 rubygems

Version Path
calabash-android-0.4.15.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.14 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.13 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.12 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.11 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.10.pre5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.10.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.10.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.10.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.10.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
testautoa-0.4.5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.9.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.9.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.9.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.9.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.7.pre10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.7.pre9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java
calabash-android-0.4.7.pre8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/GetActivityName.java