Robot Framework + appium Environment construction

Source: Internet
Author: User

Robot Framework+appium Environment The first thing you need to do is comb through the tools and installation packages:

1. Android + JAVA.

Jdk:http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html

Install the JDK and configure the environment variables.

Android sdk:http://sdk.android-studio.org/

Install and configure the environment variables. Tools list top three must be installed. Google server slightly pits you understand. Go out or switch the domestic image to download all lines, the mirror address of Baidu itself.

2. Appium

nodejs:https://nodejs.org/en/Best Installed stable version

appium:http://appium.io/

You must install Nodejs before installing Appium.

Appium relies on the. NET Framework

Put it on and open it.

Just set up here in Box 2 for Android version. My is 6.0 mobile so do not change.

After loading, introduce a check command appium-doctor

Follow the error message to modify the relevant environment variables. Until it appears, there is no wrong location. Adding Appium-doctor hints is not a command. First, set the environment variables for the appium.

3. Python + Robot Framework Series

It's more familiar here, directly written

1. Install Python2 first (3 not supported)

https://www.python.org/installed you can check add path without setting environment variables manually.

After setting environment variables, use the PIP command to install additional components

Installing the robot Framework

Pip Install Robotframework

Installing the Robot Framework Ride

Pip Install Robotframework-ride

After loading the new CMD window, open try ride.py hint to install wxpython2.8.12

Just go to the URL of the hint to find the corresponding Wxpython Unicode

The py27 version of Ride can be opened after installation.

Last pip install robotframework-appiumlibrary installation Appium Library

Open ride new test suit case.

The Guide pack must be

The above case method F5 the search in the library. Open Application Opener

The required parameters are as follows:

Open application Http://localhost:4723/wd/hub platformname=android platformversion=6.0 devicename=3bab5395 APPPACKAGE=COM.TENCENT.MM Appactivity=.ui. Launcherui

The first is the default, which is the second platform of the native Appium server Android third Android version

The fourth devicename command line input ADB devices can be displayed. The premise is that you turn on the developer rights of your phone to enable USB debugging mode. Install the phone driver.

APPPACKAGE=COM.TENCENT.MM Appactivity=.ui. Launcherui

These two are the app package name and app launch keywords don't know what to call.

Get a variety of ways. Here are two ways to write

Package Name:

Adb-s 3bab5395 Shell pm List package–f Command 3bab5395 is the device name to replace itself

List all packages to find the corresponding package name.

Then output the phone run log via the ADB logcat > filename. txt command.
Turn on logging first, then open the app and turn it off (Control + C) logging
The activity searches for the corresponding content. It's appactivity. The text is already provided

Mode 2

CMD switch to ANDROID-SDK, Build-tools directory

Use the command aapt dump badging *.apk *.apk is the installation package for the software under test.

Generating information is easy to find apppackage and appactivity.

About element positioning.

After installing the Android SDK, there is a uiautomatorviewer.bat in the corresponding Android\android-sdk\tools directory.

Use this tool to position elements.

There are many very common methods of operation in Appiumlibrary. If you want to implement any function, you can query it first.

Finally, don't forget to start the service in Appium before running the case. That's the play button.

Robot Framework + appium Environment construction

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.