Sha256: 1e182ffcfe1e71836fdcc943fcf7ed0d9d5a6657394d76f754eab2bd270d8ca2
Contents?: true
Size: 1.15 KB
Versions: 14
Compression:
Stored size: 1.15 KB
Contents
package com.amplify.honeydew_server; import android.util.Log; import android.view.KeyEvent; import com.amplify.honeydew_server.httpd.RemoteCommandReceiver; import com.android.uiautomator.core.UiDevice; import com.android.uiautomator.testrunner.UiAutomatorTestCase; public class TestRunner extends UiAutomatorTestCase { private static final String TAG = TestRunner.class.getSimpleName(); public void testRemoteLoop() throws Exception { Log.d(TAG, "Starting honeydew-server..."); UiDevice uiDevice = getUiDevice(); uiDevice.wakeUp(); unlockEmulator(); RemoteCommandReceiver remoteCommandReceiver = new RemoteCommandReceiver(new ActionsExecutor(uiDevice)); remoteCommandReceiver.start(); Log.d(TAG, "honeydew-server started, waiting for commands"); while(true) { Thread.sleep(1000); } } private void unlockEmulator() { getUiDevice().pressKeyCode(KeyEvent.KEYCODE_SOFT_LEFT); getUiDevice().pressKeyCode(KeyEvent.KEYCODE_SOFT_RIGHT); getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU); getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU); } }
Version data entries
14 entries across 14 versions & 1 rubygems