Introduction to four matching relationshipsOne or four types of matching relationships are described:Second, examples:Match string 01234567891, Exact match: 01234567892, including matching: 45678, 456, 6783. Regular match: \d{10}4. Initial match: 012, 01234, 01234567Iii. Examples of procedures: PackageCom.testuiselector;ImportCom.android.uiautomator.core.UiObject;Importcom.android.uiautomator.core.UiObjectNotFoundException;ImportCom.android.uiautomator.core.UiSelector;Importcom.android.uiautomat
* Create a new TXT file under the links directory and rename it to Svn.link* Open Svn.link, enter PATH=D:\ECLIPSE\LINKS\SVN (svn-eclipse-site-1.8.22 extracted file path), save.* Open the ECLISPE--SVN repository study and add to the left Visual window (can find instructions to install SVN in eclipse successfully)* Click the test script project in Eclipse--share project--Select svn*SVN's repository address gets:Go to the SVN repository interface. Copy the repository's address:(In the box for th
To run a program problem:Workaround:Mobile phone system version is low, I am V4.2.2, operating on Android 4.3 system is normalThe code is as follows:#Coding=utf-8" "XXX function: Test calculator basic function Note: need android 4.3 above system" " fromAppiumImportWebdriverImport Time#PATH = Lambda P:os.path.abspath (os.path.join (Os.path.dirname (__file__), p))desired_caps={}desired_caps['PlatformName']='Android'desired_caps['platformversion']='4.3'desired_caps['devicename']='4d005eebb070606f'#
voidTestscrollgetchild ()throwsuiobjectnotfoundexception{uidevice.getinstance (). Presshome (); Sleep (1000); UiObject people=NewUiObject (NewUiselector (). Text ("People")); People.clickandwaitfornewwindow (); uiscrollable Scroll=NewUiscrollable (NewUiselector (). ClassName ("Android.widget.ListView")); //specifies that a child element can be scrolled to find the phone information on any page successfullyUiObject H=scroll.getchildbytext (NewUiselector (). ClassName ("Android.wid
, Androidid); } Public voidTestcount ()throwsuiobjectnotfoundexception{uidevice.getinstance (). Presshome (); Sleep (2000); UiObject Phone=NewUiObject (NewUiselector (). Text ("Phone")); Phone.click (); Sleep (2000); //Getchildcount (Uiselector Childpattern) recursively finds the number of all eligible elements in a descendantUicollection collection=NewUicollection (NewUiselector (). ClassName ("Android.widget.TableLayout")); Uiselector Childpattern=NewUiselector (). ClassName ("A
Problem Source:In the automation process, want to automatically generate the use Case test report after the use case is completed;Reports are defined as Excel format files and are generated during use case execution.So I referenced Jxl.jar in the Uiautomator project to work with Excel filesAfter you have written it correctly, there are packaging errors, such as:1. Place the path of the jar package under compileBy modifying the Uibuild.xml (file path:
area
Boolean
scrolltobeginning (int maxswipes)
Scroll to the start position
Boolean
scrolltobeginning (int maxswipes,int steps)
Custom step scroll to the start position
Boolean
Scrolltoend (int maxswipes,int steps)
Custom step scroll to end position
Boolean
Scrolltoend (int maxswipes)
Scroll to end position
void
Setashorizontallist ()
Set Horizontal method scrolling
run.Hasanywatchertriggered (): Boolean-uideviceCheck if there is a uiwatcher triggerHaswatchertriggered (String watchername): Boolean-uideviceChecks whether a particular listener is triggeringOtherClearlasttraversedtext (): Void–uideviceTraverse from past UI events, clear text (last input)Getcurrentactivityname (): String–uideviceThis method is obsolete and returns a result that is unreliableGetlasttraversedtext (): String–uideviceRetrieves the text of the last traversed event receivedGetInstan
Version 4.1
Uicollection inherits UIObject. For example, a ListView can be used as a Uicollection object and then get the descendants control inside it by getting the child control
Getchildcount (uiselector selector)
Find a control that
Screen rotationfirst, screen Rotation related knowledge:1) direction of rotation: 0 degrees, 90 degrees (turn left), 180 degrees, 270 degrees (turn Right)2) Gravity sensor: The gravity sensor is dependent on the rotation3) fixed position: means the
first, the Assertion function Introduction 1. assert function:Determine if the method being tested works as expected
For example:
if (assuming) { Pass test}else{ error and terminate current use case test}2. Assert the function
Words don't say much, the code is affixed first. Anyway, my notes are very detailed ... About the first piece of code in life. (Basetest is written by Android developer)
Poptest is the only training institute for developing Test and development engineers in China, aiming at the ability of the trainees to be competent in automated testing, performance testing and testing tools development. Poptest launches the mobile phone automation Test course, explains the Appuim practical application, the training entire use commercial project, we may add QQ group to Exchange: 195983133Log FormFirst, let's look at a log output:Info:starting AppInfo: [Debug] attempting to kill
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.