"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

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.

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

appium architecture

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

####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

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  • Desired Capability of value - Public
    "Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  • Desired Capability value -android
    image.png

  • Desired Capability value -ios

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

#### 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

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  • Gesture part

    Click main sliding, drag, and other common scaling operation

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  • 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.

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  • How to obtain parameters

Set --- About phone
PlatformName
platformVersion

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

命令: adb devices
deviceName

image.png

command:

adb shell
logcat | grep cmp=

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

Click to start session

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

Screenshot wrong, should be written onReset noReset, automatic page Skip navigation

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

Into the interface

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  • How to record a script

    1.start Recording

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

2.Select Elements, selected after selecting a user name input box

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

3. Click send keys

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

4. Enter Select send keys idig8.com

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

The simulator user name box also changed

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

6.Select Elements, select the check box enter the password

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

7. Click send keys

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

8. The simulator changes the password box

image.png

9.Select Elements Select Sign in, click on Tap

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  1. Respond, ha ha

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  1. 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();

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

  1. The real user name and password to log in to the internal system. Simulator refresh, but appium no refresh can click on this button.

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

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.

"Docker combat chapter" python of docker crawler technology - mobile automation tool appium tool (17)

Guess you like

Origin blog.51cto.com/12040702/2400455