uiautomator

Learn about uiautomator, we have the largest and most updated uiautomator information on alibabacloud.com

Android Automated test-uiautomator Environment setup

Android Automated test-uiautomator Environment setupFirst, the Environment preparation  1. Install the Android SDK and configure the environment variables2. Install Android Studio, domestic access to the official website is limited, if not downloaded, you can go to my Baidu cloud disk download:Https://pan.baidu.com/s/1bpq5wK3This cloud disk has Uiautomator2-dependent jar packages that can be downloaded at the same time   Second, the new Android Studio

Robotium Android control positioning practices and recommendations (Appium/uiautomator sister article)

Robotium's Android control positioning practices and recommendations (Appium/uiautomator sister article):http://m.baidu.com/from=844b/bd_page_type=1/ssid=0/uid=0/pu=usm%400%2Csz%401320_1001%2Cta%40iphone_2_4.2_3_/ baiduid=30086ef8b157b7aefef076f1c0463900/w=0_10_appium+findelement+by+name/t=iphone/l=3/tc?ref=www_iphone Lid=9700264204795620165order=6vit=osrestj=www_normal_6_0_10m=8srd=1cltj=cloud_ Titledict=30fm=wnor_p1%7cl1sec=43575di=3d02554fa1015383b

[UiAutomator] the difference between using the instance and index methods in UiSelector to locate controls.

[UiAutomator] the difference between using the instance and index methods in UiSelector to locate controls. When you use UiAutomator to write test cases, the most common operation is the control query operation. In UiSelector, there are two methods for locating controls: instance and index. So what are the differences between the two methods? First, let's take a look at the official api description: Instanc

In the Android automation test, uiautomator modifies uiautomatorviewer to fail to obtain the dynamic interface.

In the first article: Comparison of controls obtained by hierarchyviewer and uiautomatorviewer in android automated testing (1) I said that an error will be reported when uiautomatorviewer obtains the dynamic interface. The error is as follows: Today, when I learned uiautomator and used dumpWindowHierarchy () to obtain control information, I found that this method can obtain dynamic interface information. This makes up for the defect of uiautoma

Python+android+uiautomator of the environment

Python+android+uiautomator the environment to buildPythonDownload the appropriate version of the system and install it, tick the path to add it when installingVerify: Open cmd input python under WindowsThe following interface appears to indicate successful installationAndroidDownload installation path: HTTP://TOOLS.ANDROID-STUDIO.ORG/INDEX.PHP/SDKDownload the installation JDK firstJDK Installation Documentation: http://jingyan.baidu.com/article/6dad50

Use Uiautomator to simulate the setting of the operation on the phone

1. The default code on the phone is utf-8, so the project needs to be set to UTF-8 encoding;2. Open the mobile phone developer mode, the first time the phone connected with the computer, you need to download the driver, to pop up the allowed debug box, computer-side with the app Bao and other software connected to the mobile phone will automatically download the driver;3. Use ADB devices to see if the phone is authorized successfully;4. Hit the jar pack and push the jar package to the phone. ADB

Android Wireless test-uiautomator Uidevice API Introduction Three

Get coordinates and coordinates clickKnowledge related to coordinates:1) Phone screen coordinates: Upper left corner start to bottom right corner end2) DP: device independent pixels, such as 320 pixel display to 640 pixels to stretch one times3) point: Represents a dot (x, y), and the upper-left corner of the coordinate is always (0,0)Two, coordinate related API: return value Method name Describe Boolean Click (int x, int y) Use coordinates to tap

ANDROID-UIAUTOMATOR:[5] Stop Monkey Test

Method/Step 1In fact, the stop is very simple, just to end the process of monkey offHow to stop it? 2PS command to find the Uiautomator processOpen cmd Command Line windowInput:ADB Shell PS | grep MonkeyThe first number returned, which is the process number of the monkey 3The KILL command ends the process to continue typing:ADB shell kill [process number just found]End other processes as well, and other applications can also use this method

Configuring the ant environment in Uiautomator is not an internal command with an external command

The various types of environment configurations that are configured in Uiautomator today are based on the documentation,Result input in cmd: ant-versionPage report ant is not an internal command, instant dumbfounded, I was not configured error Ah, the result and re-looked at the document, or not wrong, but after the input command, or always error;1. Configuration environment:New :( variable value in system variable depends on each person extracting th

"Uiautomator" Input Chinese (Input method installation + test code)

(" Etpassword can not been found ", etpassword.exists ()); Etpassword.click (); Etpassword.cleartextfield (); Etpassword.settext (Password); Thread.Sleep (+);//click on login button UiObject btloginbutton=new UiObject (New Uiselector (). ClassName (" Android.widget.Button "). Text (" login ")); Assertequals ("Landing", Btloginbutton.gettext ()); Btloginbutton.clickandwaitfornewwindow (); Thread.Sleep (+); System.out.println ("Login beixunapp Success"); }3, add the principle of knowled

Uiautomator Learning Notes (2)-Compiling and running code

, open the Build.xml file, and modify the second line of help to build    Start compiling: ant, use the command line to open the project root directory and execute ant directly Note the JAR package location information in the output results   Push file to Mobile: adb push Run test: adb shell uiautomator runtest -C Test all the use cases under a class, Package_name.class_name To test

Uiautomator Study Notes (3)-Quick Commissioning

Why do I need quick commissioning? Uiautomator cannot be debugged directly at Eclipse Inefficient command-line debugging For quick Commissioning Steps Open Https://github.com/fan2597/UiAutomatorHelper Download the project Copy the Uiautomatorhelper.java to the test project New Java Main method, fill in the following code Public Static void Main (string[] args) { String jarname, TestClass, testname, Androidid;

[UiAutomator] usage of instance and index in UiSelector, instanceof usage

[UiAutomator] usage of instance and index in UiSelector, instanceof usage When you use UiAutomator to write test cases, the most common operation is the control query operation. In UiSelector, there are two methods for locating controls: instance and index. So what are the differences between the two methods? First, let's take a look at the official api description: Instance (int instance ):Set the search c

Android TV Tile App Automation framework two modifications (based on Uiautomator)

.getpixel (j, i) = = Bitmap1.getpixel (j, i)) {piccount++; } piccountall++; } }intresult = (int) (((float) piccount)/Piccountall * -);NewPrintln (Piccount +"/"+ Piccountall);NewPrintln ("Similarity is:"+ result);returnResult }}Exceptions Other modulesDefines some exception classes, the main function is used to prompt, the role of this hint will be used later.Added a way to start the app and close the app, using the shell command.Runtime.getRuntime().exec("am sta

The difference between Hierarchyviewer, Uiautomator and Appium!

First, Hierarchyviewer:Pros: Intuitive access to information about UI layout design structures and various properties in a visual perspectiveCons: 1) Poor stability, there are some situations in which the probability of obtaining a certain control is not obtained.2) performance is not good, when using the Hierarchyviewer function test, get control and so on when the execution efficiency is very low, resulting in the entire test time use particularly long, consumption of debugging time3) Only use

"Uiautomator" interfaces+exception

: Iautomationsupport Getautomationsupport () To report a temporary state when you run a test case Bundle Getparams () Get Command line arguments Uidevice Getuidevice () Get Uidevice instances void Sleep (Long ms) Sleep time Inheritance method:Junit.framework.TestCaseJunit.framework.AssertJunit.framework.TestJava.lang.ObjectExceptionsCom.android.uiautomator.core.UiObjectNotFoundExeption

"Uiautomator" Uiselector

) Focus Properties Uiselector Fromparent (uiselector selector) Search Parent Class Uiselector Index (int index) Search by number of nodes in the layout layer, unreliable, generally used as a last resort Uiselector instance (int instance) Search indexes such as: Uiselector (). ClassName ("Android.widget.ImageView"). Enabled (TRUE). instance (2); Uiselector Longclickable (Boolean val) Long Press Pr

Introduction to Android Automated Test Uiautomator--uiobject interface

boolean performtwopointergesture (Point staretPoint1, point StatsPoint2, point EndPoint1, point endPoint2, int St EPsPerform any two finger touch gestures to simulate two finger gestures2.public boolean pinchin (int precent, int steps)Gesture operation, two-point inward contraction3.public boolean pinchout (int percent, int steps)Gesture operation, open two points outward4.public boolean performmultipointergesture (Pointercoords ... touches)Perform a single finger touch gesture to define any ge

Android Wireless test-uiautomator UiObject API Introduction Seven

= "Testexists"; Androidid= "1"; NewUiautomatorhelper (Jarname,testclass,testname,androidid); } Public voidTestexists ()throwsuiobjectnotfoundexception{uidevice.getinstance (). Presshome (); Sleep (2000); UiObject message=NewUiObject (NewUiselector (). Text ("Messaging")); Message.click (); Sleep (2000); UiObject text=NewUiObject (NewUiselector (). Text ("No conversations."))); if(Text.exists ()) {System.out.println ("No conversations, please create a message"); } UiObject Create=N

Android Wireless test-uiautomator Uiselector API Introduction Seven

(); } Public voidTestpackage ()throwsuiobjectnotfoundexception{uidevice.getinstance (). Presshome (); Sleep (1000); Uiselector DL1=NewUiselector (). PackageName ("Com.android.deskclock"); UiObject Deskclock1=NewUiObject (DL1); Deskclock1.click (); Sleep (1000); Uidevice.getinstance (). Pressback (); Sleep (1000); Uiselector DL2=NewUiselector (). Packagenamematches (". *deskclock"); UiObject Deskclock2=NewUiObject (DL2); Deskclock2.click (); }}Demo1.java

Total Pages: 13 1 .... 3 4 5 6 7 .... 13 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.