Cryanimal qq:164166060 This article briefly introduces the architecture of the Appnium Automation framework, the loading process, supported languages, related configurations, and element positioning tools. Official website:
Http://appium.io
Appnium is supported by Saucelabs, an industry-leading Test product company with proven enterprise testing solutions
Platforms supported by Appium
- Android uses instrumentation and uiautomator two sets of technologies
- iOS using UIAutomation
- Firefox is also supported and can be extended to other platforms
Advantages of Appium
- Cross-architecture, native hybrid WebView
- Cross device, Android Iosfirefoxos
- Cross-language, Java python ruby nodejsphp
- Cross app to interact with multiple apps
- Do not rely on source code
- Unlimited test frameworks and platforms
Appium Architecture on Android
Appium Architecture on iOS
Installation of Appium
See: http://blog.csdn.net/kaka1121/article/details/51698700
The start of the Appium, the above also has the explanation
By command: Appium–help can see some optional parameters
Open port 4723 to accept Webdriver requests by default
Default on 4724 for Android communication
Video Demo: http://v.youku.com/v_show/id_XNjM0ODIxNTUy.html
Appium Automation required tools and Android development environment installation
Dependent tools include Uiautomatorviewer, Abd, DDMS, etc.
See: http://blog.csdn.net/kaka1121/article/details/51698745
Loading process for Appium
Appium support for mainstream languages
Appium Webdriver's capabilities configuration
Capabilities is a set of key-value pairs that the client sends to the Appium server to tell the server what kind of session we want to start. There are also key-value pairs that are used to modify the behavior of the server side during automation.
Required Items :
devicename: I can run the test on my machine regardless of what value I fill, but this is mandatory. The Appium version I used was V1.2.2.
app : If you fill out, Appium will install the test target app on the target machine, and if not, will find the target app based on Appactivity and Apppackage to the target machine.
apppackage : Can be obtained by using the SDK's own tool AAPT
appactivity: Also available through the tools above.
One thing to note is that the value can be packagename or not attached.
In other words, the following two types of filling methods are all right. Noteslist "and" Com.example.android.notepad.NotesList "
General configuration:
Android only:
IOS only
Configuration text See: http://blog.sina.com.cn/s/blog_700be1c00102vgha.html
Java Demo sample
For more information, see my other blog post
Element positioning
- Native controls for Android and iOS and WebView controls are mapped to specific names, such as mapping buttons for all platforms to button elements
- Map the current tree to an HTML document
- Selecting Elements through XPath
Three ways to locate
- Name:id,label text
- Tag_name:component type
- Xpath
View the attributes of an element and the XPath, using Uiautomatorview
Element interaction
Webdriver has supported
Mobile Related:
Appendix: Industry Top Frame Comprehensive comparison
Research on Appnium Mobile automation framework