Original article, welcome to reprint. Reproduced please specify: Reprinted from IT people story , thank you!
Original link address: "docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)Appium test automation framework is an open source, it can be used for native, mixed and mobile Web application testing. It uses WebDriver protocol driver iOS, Android applications. Direct languages: java, python, and so on.
appium architecture
####desired capability
The function is desired capability to configure Appium session. They tell Appium server you want to automation platforms and applications. Official website: http://appium.io/slate/en/master/?java#appium-server-capabilities
-
Desired Capability of value - Public
-
Desired Capability value -android
- Desired Capability value -ios
#### Appium advantages and disadvantages
-
advantage:
Support a variety of test applications
support the use of multiple languages to write test scripts
does not require special compiler being tested applications
jump between Appium support application testing - Disadvantages:
Because the server is running on the computer, the tool must be connected to the computer before you can run
only for UI automated testing, test verification and in many cases can only be carried out by verifying interface
Operating Controls
- Gets control information
- Gesture part
Click main sliding, drag, and other common scaling operation
- Operating system API
Analog hardware operating system is operable to set a network environment, access to system information, a brief look at the table of the conventional method.
- How to obtain parameters
Set --- About phone
PlatformName
platformVersion
命令: adb devices
deviceName
command:
adb shell logcat | grep cmp=
Click to start session
Screenshot wrong, should be written onReset noReset, automatic page Skip navigation
Into the interface
- How to record a script
1.start Recording
2.Select Elements, selected after selecting a user name input box
3. Click send keys
4. Enter Select send keys idig8.com
The simulator user name box also changed
6.Select Elements, select the check box enter the password
7. Click send keys
8. The simulator changes the password box
9.Select Elements Select Sign in, click on Tap
- Respond, ha ha
- Script out
MobileElement el6 = (MobileElement) driver.findElementById("com.tal.kaoyan:id/login_email_edittext");
el6.sendKeys("idig8");
MobileElement el7 = (MobileElement) driver.findElementById("com.tal.kaoyan:id/login_password_edittext");
el7.sendKeys("password");
MobileElement el8 = (MobileElement) driver.findElementById("com.tal.kaoyan:id/login_login_btn");
el8.click();
- The real user name and password to log in to the internal system. Simulator refresh, but appium no refresh can click on this button.
PS: appium significantly Bian Zhuo's easy to use tool that ui much emphasis on that part of the beginning of the configuration, capture the beginning, my Andriod word wrong, is onReset, screenshots written onReset, hope not to mislead old iron them.