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')
    }
    

      

  • 相关阅读:
    js原型链
    js的__proto__,prototype、constructor属性
    百度ife2015-小白的弯路2
    百度ife2015-小白的弯路1
    Visaul Studio 密钥
    pycharm常用的一些快捷键
    python3练习题--字符串
    字符串相关方法
    python3 基本数据类型
    在python中缩进的重要性
  • 原文地址:https://www.cnblogs.com/zsr0401/p/6279407.html
Copyright © 2011-2022 走看看