zoukankan      html  css  js  c++  java
  • Uiautomator 2.0

    1  Android Studio -> Create project "uiautomator2demo"

    2  cd uiautomator2demo

        cp ../libs ./

        选中libs/*.jar -> Add library -> 选择module -> app 

       则在 app/build.gradle 中

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 24
        buildToolsVersion "25.0.2"
    
        defaultConfig {
            applicationId "com.autotest.uiautomator2demo"
            minSdkVersion 15
            targetSdkVersion 24
            versionCode 1
            versionName "1.0"
            // add testInstrumentationRunner
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:24.2.1'
        // 选中 libs/*jar , 右击 -> Add as Lib -> 选择Module -> app ,则自动生成下面的compile files
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/espresso-contrib-2.2-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/espresso-core-2.2-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/espresso-idling-resource-2.2-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/espresso-intents-2.2-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/espresso-web-2.2-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/exposed-instrumentation-api-publish-0.3-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/hamcrest-core-1.3.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/hamcrest-integration-1.3.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/hamcrest-library-1.3.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/javawriter-2.1.1.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/javax.annotation-api-1.2.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/javax.inject-1.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/jsr305-2.0.1.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/junit-4.12.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/rules-0.3-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/runner-0.3-release-no-dep.jar')
        compile files('~/AndroidStudioProjects/uiautomator2demo/libs/uiautomator-v18-2.1.1-release-no-dep.jar')
    }
    

      

  • 相关阅读:
    QQ空间留言的JS
    Session超时问题(AOP 过滤器)
    IFrame实现的无刷新(仿ajax效果)...
    NPOI帮助类(Excel转DataTable、DataTable转Excel)
    SignalR with ASP.NET MVC5 可用于倒计时同步
    我(webabcd)的文章索引
    WorkFlow4.0--入门到精通系列-专题索引
    Android利用Fiddler进行网络数据抓包
    IIS给网站地址配置成HTTPS的
    SQL SERVER 2005 获取表的所有索引信息以及删除和新建语句
  • 原文地址:https://www.cnblogs.com/zsr0401/p/6279407.html
Copyright © 2011-2022 走看看