Python3 crawler actual -9, APP crawling related library is installed: Appium Installation

Appium end mobile automated testing tools, like the previously mentioned Selenium, we can use it to drive Android, iOS and other equipment to complete automated testing, such as to simulate a click, slide, input and other operations, its official website is:http://appium.io/ , take a look at this section of the installation Appium.

1. Links

2. Install Appium

First we need to install Appium, Appium responsible for driving mobile terminal to complete a series of operations for iOS devices, it uses Apple's UIAutomation drive to achieve, for Android, it is implemented using UiAutomator and Selendroid drive.
Meanwhile Appium also corresponds to a server, we can send some operation instruction to Appium, Appium will drive the mobile device in accordance with the instruction, perform different actions.
Appium installed in two ways, one is directly download the installation package Appium Desktop to install, the other is to install by Node.js, let's introduce each two installation methods.

appium Desktop

Appium Desktop supports installation of the entire platform, we can be installed directly from the GitHub Releases Inside, the link is:https://github.com/appium/app...。

Windows platforms can be downloaded exe installation package as appium-desktop-Setup-1.1.0.exe, Mac platform installation package can be downloaded dmg as appium-desktop-1.1.0.dmg, Linux platform can choose to download the source code, but more is recommended below the Node.js installation.
After running After installation page shown in FIG. 1-73:

[Image dump outer link failure (IMG-D4LVxHtL-1564062548537) ( https://upload-images.jianshu.io/upload_images/17885815-44d5f10efdfcd17c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240 )]

Figure 1-73 run the page
if there is proof of the successful installation of this page.

Node.js

First you need to install Node.js, specific installation can be found in:http://www.runoob.com/nodejs/ ..., after the installation is complete, you can use the command npm.
Next, using the global command npm Appium installation can, following commands:

npm install -g appium
Python资源分享qun 784758214 ,内有安装包,PDF,学习视频,这里是Python学习者的聚集地,零基础,进阶,都欢迎

Wait for the command to complete execution, thus successfully installed Appium.

3. Android development environment configuration

If we want to use Android App grab equipment to do so, also you need to download and configure the Android SDK, recommended here directly installed Android Studio, download address is:https://developer.android.com ..., can be installed directly after downloading.
After completing we also need to download the Android SDK, open directly inside the Android SDK Preferences settings page, check the SDK version to install, click OK to start the download and installation check version of the SDK, as shown in Figure 1-74:

Python3 crawler actual -9, APP crawling related library is installed: Appium Installation

Figure 1-74 Android SDK settings page
also need to configure the environment variables, adding ANDROID_HOME path where the Android SDK, and then add the SDK folder under the tools and platform-tools folder to the PATH.
A more detailed configuration can refer to the official documentation of Android Studio:https://developer.android.com...。

4. iOS development environment

First need to declare that, Appium is a do automated testing tool, use it to test our own development App is not in question, it carries a developer certificate (Development Certificate). But if we want to take iOS device to do the crawl data, then it is another matter, and generally we do is crawl data using existing APP, usually on iOS through the App Store to download, it carries is to distribute certificates (distribution certificate), and the application is prohibited to carry such a certificate being tested, so it can be Appium tested, specific methods will not elaborate launched only after obtaining ipa installation package and then re-sign, such as interest can search for relevant information.
So here recommended direct use of Android to test, if you can re-signing operation completion of the operation, you can refer to the following configuration iOS development environment.
Appium iOS device driver must be carried out under Mac, Windows and Linux is the platform can not be done, just tell us about the following configuration Mac platform.
Mac platform required configuration is as follows:

  • Mac OS X 10.12 and later

XCode 8 and later
execute the following command to configure the development of after-dependent configuration to meet the requirements of some libraries and tools:

xcode-select --install
Python资源分享qun 784758214 ,内有安装包,PDF,学习视频,这里是Python学习者的聚集地,零基础,进阶,都欢迎

This part of iOS development environment configuration is complete, we can use the iOS simulator for testing and data grabbed.
If you want to test and fetch data with real machine, it also requires additional configuration other environmental

5 Conclusion

These are set up Appium development environment, later we will use it to grab the contents of micro-channel circle of friends.

Guess you like

Origin blog.51cto.com/14445003/2424879