<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      UIAutomator

      UI Automator Viewer

      The uiautomatorviewer tool provides a convenient GUI to scan and analyze the UI components currently displayed on an Android device. You can use this tool to inspect the layout hierarchy and view the properties of UI components that are visible on the foreground of the device. This information lets you create more fine-grained tests using UI Automator, for example by creating a UI selector that matches a specific visible property.

      The uiautomatorviewer tool is located in the <android-sdk>/tools/ directory.

      Access to device state

      The UI Automator testing framework provides a UiDevice class to access and perform operations on the device on which the target app is running. You can call its methods to access device properties such as current orientation or display size. The UiDevice class also let you perform actions such as:

      • Change the device rotation
      • Press a D-pad button
      • Press the Back, Home, or Menu buttons
      • Open the notification shade
      • Take a screenshot of the current window

      For example, to simulate a Home button press, call the UiDevice.pressHome() method.

      UI Automator APIs

      The UI Automator APIs allow you to write robust tests without needing to know about the implementation details of the app that you are targeting. You can use these APIs to capture and manipulate UI components across multiple apps:

      • UiCollection: Enumerates a container's UI elements for the purpose of counting, or targeting sub-elements by their visible text or content-description property.
      • UiObject: Represents a UI element that is visible on the device.
      • UiScrollable: Provides support for searching for items in a scrollable UI container.
      • UiSelector: Represents a query for one or more target UI elements on a device.
      • Configurator: Allows you to set key parameters for running UI Automator tests.

      For example, the following code shows how you can write a test script that brings up the default app launcher in the device:

      // Initialize UiDevice instance
      mDevice = UiDevice.getInstance(getInstrumentation());

      // Perform a short press on the HOME button
      mDevice().pressHome();

      // Bring up the default launcher by searching for
      // a UI component that matches the content-description for the launcher button
      UiObject allAppsButton = mDevice
              .findObject(new UiSelector().description("Apps"));

      // Perform a click on the button to bring up the launcher
      allAppsButton.clickAndWaitForNewWindow();

      To learn more about using UI Automator, see the API reference and Testing UI for Multiple Apps training.

      Testing Support Library Setup


      The Android Testing Support Library package is included with the latest version of the Android Support Repository, which you can obtain as a supplemental download through the Android SDK Manager.

      To download the Android Support Repository through the SDK Manager:

      1. Start the Android SDK Manager.
      2. In the SDK Manager window, scroll to the end of the Packages list, find the Extras folder and, if necessary, expand to show its contents.
      3. Select the Android Support Repository item.
      4. Click the Install packages... button.

      After downloading, the tool installs the Support Repository files to your existing Android SDK directory. The library files are located in the following subdirectory of your SDK: <sdk>/extras/android/m2repository directory.

      The Android Testing Support Library classes are located under the android.support.test package.

      To use the Android Testing Support Library in your Gradle project, add these dependencies in your build.gradle file:

      dependencies {
        androidTestCompile 'com.android.support.test:runner:0.4'
        // Set this dependency to use JUnit 4 rules
        androidTestCompile 'com.android.support.test:rules:0.4'
        // Set this dependency to build and run Espresso tests
        androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
        // Set this dependency to build and run UI Automator tests
        androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
      }

      To set AndroidJUnitRunner as the default test instrumentation runner in your Gradle project, specify this dependency in your build.gradle file:

      android {
          defaultConfig {
              testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
      }

      It is strongly recommended that you use the Android Testing Support Library together with the Android Studio IDE. Android Studio offers capabilities that support test development, such as:

      • Flexible Gradle-based build system that supports dependency management for your test code
      • Single project structure to contain your unit and instrumented test code together with your app source code
      • Support for deploying and running tests on virtual or physical devices, from a command line or graphical user interface

      For more information about Android Studio and to download it, see Download Android Studio and SDK Tools.

      posted @ 2016-01-28 20:30  to be crazy  閱讀(1255)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 91亚洲国产三上悠亚在线播放 | 亚洲精品乱码久久久久久中文字幕| 熟女精品视频一区二区三区| 国产午夜A理论毛片| 中文精品无码中文字幕无码专区| 亚洲熟妇精品一区二区| 久久人搡人人玩人妻精品| 亚洲av天堂综合网久久| 九九成人免费视频| 一区二区丝袜美腿视频| 精品久久精品久久精品久久| 台湾佬自拍偷区亚洲综合| 中文字幕日韩有码一区| 久热这里只有精品视频3| 久久天天躁狠狠躁夜夜婷| 成人午夜福利视频后入| 国产精品99久久免费| 国产精品无遮挡猛进猛出| 黑人欧美一级在线视频| 亚州中文字幕一区二区| 四虎国产精品免费久久| 蜜桃视频在线观看网站免费| 国产亚洲精品VA片在线播放| 午夜成人精品福利网站在线观看| 中文字幕亚洲人妻一区| 荃湾区| 亚洲欧洲av一区二区久久| 91福利视频一区二区| 沧州市| 人妻伦理在线一二三区| 国产AV无码专区亚洲AV潘金链| 欧美极品少妇×xxxbbb| 国产蜜臀av在线一区二区| 国产成人a在线观看视频免费| 精品一区二区三区无码视频| 日韩精品一区二区三区在| 99中文字幕精品国产| 99re热视频这里只精品| 爆乳喷奶水无码正在播放| 亚洲人妻精品一区二区| 德州市|