1. Read the Appium documentation
This is one of the most important techniques that many people overlook. The Appium documentation explains how to use the Appium properly and what the Appium can’t do or have to do in a special way. Most of the beginner’s questions can be answered here.
Chinese documents (translated by testerhome open source team, has consistent and official documents) : https://github.com/testerhome/appium/tree/master/docs/cn
English document: https://github.com/appium/appium/tree/master/docs/en
2. Search Google or StackOverflow after reading the Appum Log
AppIum’s log is debug level by default, so it’s very rich. If you know how to read correctly, you can easily find answers from Google/StackOverflow.
PS: Baidu is not recommended. In fact, most of the searches on Baidu are from TesterHome…
Due to the main structure is: Appium
Android: use adb management equipment, installation and application, use UiAutomator/selendriod driver for the application of various operations (to find elements, click, etc.)
iOS: using Instruments management equipment, use UiAutomation driver for the application of various operations
So there are the following types of logs for Appium:
1, Network communication log (
-->; code> or & lt; --
symbol) :
info: --> GET /wd/hub/status {}
info: <-- GET /wd/hub/status 200 1.335 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
This type of log typically occurs when the Appium Client communicates with the Appium Server and records the original communication information. Usually, the error is simply an error in the execution below and then fed back to the upper level (see HTTP Status Code for errors). The status code above is 200, which means the process was successful.
[debug]
/ code>
>
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
...
info: [debug] Configuring Safari session
info: [debug] We're on iOS8+ so not copying mobile safari app
info: [debug] Creating new appium session 59f933a1-ee07-45d3-bbec-cabfe89735d8
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
This type of log is the Appium Server internal log, which occurs most frequently and describes what is being done inside the Appium Server at this time (calling other tools, creating sessions, and so on). If there is an error here and none of the following three types of errors, it is an error of the Appium Server.
3, Apple Instruments Log (There is an extra timestamp in the Log contents. If you use.app, the log is colored green) :
info: [debug] [INST] 2015-03-13 23:31:59 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-03-13 23:31:59 +0000 Debug: responding with:
info: [debug] [INST] 2015-03-13 23:31:59 +0000 Debug: Running system command #1: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":true}...
This class of log is the log of the Instruments, and the AppIum is just attached to the AppIum log for your convenience. This type of log error is referred to as Instruments.
4, Android UiAutomator log (in the [UiAutomator STDOUT] code> or
[the BOOTSTRAP] code>) :
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
This class log is the log of UIautomator. [Uiautomator STDOUT]
the log of BOOTSTRAP UiautomatorTestRunner, [>tstrap]
is the>of BOOTSTRAP tool installed on the device under test by AppIum. Therefore, Appium made a special test case of Uiautomator to receive and execute the Appium command on the device under test. Log error here, please look for Uiautomator (BootStrap is part of AppIum, but it is usually an error when calling the Uiautomator API).
Selendroid log (starting with [Selendroid]
:
info: [debug] [SELENDROID] mSeq=0 mSystemUiVisibility=0x0
info: [debug] [SELENDROID] mSystemDecorRect=[0,38][480,728] last=[0,38][480,728]
This class of logs is the log handled internally by Selendroid. If something goes wrong here, look for Selendroid.
3. Search the AppIum Official Issue and Discussion Group and TesterHome based on the error message:
issue:https://github.com/appium/appium/issues
discussion group: https://discuss.appium.io/
testerhome:http://testerhome.com/
Read More:
- [Solved] Appium Android, Appium settings and Unclock method will be installed every time the phone is started
- Appium step pit summary — solution
- Appium connecting to the ADB 5037 port of nocturnal simulator is occupied by itself
- The ADB server port is changed to 10001, and appium cannot connect to the device
- Sorting out MySQL “too many connections” solutions
- Writing to settings when appium of Xiaomi mobile phone and oppo mobile phone starts requires:android.permission.WRITE_ SECURE_ SETTINGS
- pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection: anjuke.ershoufang index
- C++: terminate called after throwing an instance of ‘std::length_error‘ (sort function cmp sorting rules problem)
- Mapped Statements collection does not contain value for XXXX
- Mybatis custom list collection parser
- E11000 duplicate key error collection in mongodb
- Oracle error collection solution
- Java garbage collection
- Raspberry Pi 3 installation and software configuration issues collection
- Design of MQ asynchronous collection report data
- Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block collection
- Spring boot integrates es cluster error report collection
- The most complete collection of solutions to Tortoise SVN Clean up failure
- There are errors 1304 and 2350 FDI server errors in ArcGIS Server installation
- Python random selects elements randomly from a collection