Appium Environment configuration under Mac

Source: Internet
Author: User
Tags install node appium

First, Appium environment construction1. Xcode (requires OS X version support): Download the corresponding version of Xcode (support the corresponding phone system), unzip, drag into the application. XCODE:HTTPS://DEVELOPER.APPLE.COM/DOWNLOAD/MORE/2, install Appium: Install node, brew, NMP, Carthage, etc.: http://www.jianshu.com/p/ EFA9AC4900A61) If you have an older version of Appium, you need to uninstall the previous version of APPIUM:NPM uninstall-g appium2) to download the appium1.6.5 release: https://github.com/appium/      appium/releases/tag/v1.6.5, terminal into the file directory, command line installation: NPM install. Verify installation succeeded: Terminal input "Appium-v", the version number indicates that the installation was successful.There is a pit here: Appium-desktop 1.6.4 and below do not support xcode9.0.1, (please note your Xcode version and Appium version, otherwise will be error)3) Associate with System: NPM link4) Install Appium Desktop program: https://github.com/appium/appium-desktop/releases/tag/v1.2.0, download Zip package, unzip, drag into application. 5) Appium Webdriveragent has a bug, change to use the Facebook webdriveragent (webdriveragent download: https://github.com/facebook/ webdriveragent/): Download webdriveragent from Git and go to/applications/appium.app/contents/resources/app/node_modules/appium/ Node_modules/appium-xcuitest-driver/webdriveragent directory, command line run:./scripts/ bootstrap.sh, download the dependency, and then replace the file with the webdriveragent in the Appium app (directory:/applications/appium.app/contents/resources/app/node_ modules/appium/node_modules/appium-xcuitest-driver/webdriveragent) use Xcode to open the Webdriveragent program, Install the Webdriveragent program on the real machine, the Webdriveragent application appears on the phone to indicate the installation is successful. (Trust the developer certificate used by Xcode in the general-purpose profile file) reference:https://testerhome.com/topics/7220http://www.7forz.com/2973/   3, Detection appium Environment: terminal input: Appium-doctor4, start appium Desktop program: appiumdesktop use:https://www.jianshu.com/p/bf1ca3d4ac76Start Appium. Be sure to run Appium before running the automated test script to start the test app. 1) Start the Appium server in the following two ways. (Appium boot will start the webdriveragent, do not turn off the webdriveragent after startup, or start again Appium will error) mode 1, through the command line installed Appium can be started through the terminal, Terminal input: Appium, See the terminal print out the following log, indicating that the server started successfully. Mode 2, has installed the Appium Desktop program can start the desktop program to start the Appium server. Open the program to see the following page: Directly click on the start server to start the Appium server, and the terminal command line to start the print out of the same log, as follows: Three red boxes are: ① View the application Element (inspector) ② Save the log file ③ stop Appium server. After the Appium server is started. You can run automation directly. Configure some desired capabilities information: The default is to start a session in 127.0.0.1ip and 4723 ports, if you want to start multiple sessions, you can modify the port number by: Click on Custom Server, Server IP input 127.0.0.1, enter a port number that is not currently in use. Generally need to fill in the parameters are PlatformName (platform), Platformversion (platform version), Udid (device Udid, fill the wrong can not start the application), DeviceName (device name), Bundleid (Applied Bundleid) , Automationname (Must fill in xcuitest, do not write the default is UIAutomation way, this method does not support IOS10). To connect to an iOS real computer, you must turn on the developer mode of the real machine. Then select the configured information that you want to start, and click Start Session. You can see the accessibility_id, XPath, value, and coordinates of the element in the following screen, which indicates the success of the launch. Supports recording scripts. second, installation and operation of the hole encountered in the processPit 1, A new session could not being created. Details:appium ' s iosdriver does not support for Xcode version 8.3.3.Apple has deprecated uiautomation. Use the "xcuitest" automationname capability instead. Solution: Add--capability parameters   pits in Automationname=xcuitest 2, AssertionError:Message:An Unknown server-side error occurred while processing the command. Original Error:unknown device or simulator UDID: ' * * * ' solution: Appium use idevice_id (part of Libimobiledevice) to determine the availability of the device brew Install Libimobiledevice--head  Pit 3, AssertionError:Message:An unknown server-side error occurred while processing T He command. Original error: could not initialize Ios-deploy Make sure it's installed (NPM install-g Ios-deploy) and works on Yo Ur system Solution: Install ios-deploynpm install-g ios-deploy  pit 5:appium-desktop 1.6.4 and below does not support xcode9.0.1, need to upgrade Appium   PIT 6:webdriveragent Installation failure solution: Recompile webdriveragent, reference address https://www.cnblogs.com/baconLiu/p/6861431.htmlhttp:// Www.cnblogs.com/meitian/p/7359787.html cd/usr/local/lib/node_modulEs/appium/node_modules/appium-xcuitest-driver/webdriveragentxcodebuild-project Webdriveragent.xcodeproj-scheme Webdriveragentrunner-destination ' id=3825bba08e5c10c499ddaf0276bac01983ab7119 ' test   Other people found pits:/http blog.csdn.net/temanm/article/details/51862600    

Appium environment configuration under Mac

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.