@@ -0,0 +1,614 @@
+package com.ifeng.at.testagent;%0A%0Aimport android.support.test.InstrumentationRegistry;%0Aimport android.support.test.runner.AndroidJUnit4;%0Aimport android.support.test.uiautomator.UiDevice;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0A/**%0A * Created by zhaoye on 2016/11/30.%0A *%0A */%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class Tools %7B%0A%0A    @Test%0A    public void dump() throws IOException %7B%0A        UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());%0A        device.dumpWindowHierarchy(new File(%22/sdcard/ui.uix%22));%0A    %7D%0A%7D%0A

test tools