device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java
public String getDump() {
    pushAutomator2Device();
    runtest();
    String path = pullDump2PC();
    String xml = "";
    try {
      FileInputStream fileInputStream = new FileInputStream(path);
      @SuppressWarnings("resource")
      BufferedReader in = new BufferedReader(
          new InputStreamReader(fileInputStream));
      StringBuffer buffer = new StringBuffer();
      String line = "";
      while ((line = in.readLine()) != null) {
        buffer.append(line);
      }
      xml = buffer.toString();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return xml;
  }
public String getDump() {
    pushAutomator2Device();
    runtest();
    String path = pullDump2PC();
    String xml = "";
    try {
      FileInputStream fileInputStream = new FileInputStream(path);
      @SuppressWarnings("resource")
      BufferedReader in = new BufferedReader(
          new InputStreamReader(fileInputStream));
      StringBuffer buffer = new StringBuffer();
      String line = "";
      while ((line = in.readLine()) != null) {
        buffer.append(line);
      }
      xml = buffer.toString();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return xml;
  }
public String getDump ( ) { pushAutomator2Device ( ) ; runtest ( ) ; String path = pullDump2PC ( ) ; String xml = "" ; try { FileInputStream fileInputStream = new FileInputStream ( path ) ; @ SuppressWarnings ( "resource" ) BufferedReader in = new BufferedReader ( new InputStreamReader ( fileInputStream ) ) ; StringBuffer buffer = new StringBuffer ( ) ; String line = "" ; while ( ( line = in . readLine ( ) ) != null ) { buffer . append ( line ) ; } xml = buffer . toString ( ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return xml ; }
get current android page's dump file
get current android page s dump file