Preface
Recently, I spent more energy on Android automation, but saw a lot of people on the web studying and learning about iOS automation, so I took the time to study it yesterday. Make a note of it. Body
Brew
In this case, brew is installed, and brew is an essential Suite manager for Mac OS.
Execute the following command
Ruby-e "$ (curl-fssl https://raw.github.com/Homebrew/homebrew/go/install)"
Node.js
Down is the installation of Node.js, Brew install node
PS: Install here as far as possible do not use sudo command to install, otherwise there will be a permission problem
Appium
Appium installation here directly using the DMG file installation.
Download Address Appium
If you need to install it through the command line, then it's NPM install-g appium
Selenium
Download Address Selenium
Run Python setup.py install directly after downloading
appium-python-client
Download Address Python-client
Appium-doctor
After completing the above preparation, we run Appium. Run Appium-doctor, you can click on the Appium interface
To see if our environment configuration is OK.
➜ ~ appium-doctor
Running iOS Checks
✔xcode is installed at/applications/xcode.app/contents/ Developer
✔xcode Command line Tools are installed.
✔devtoolssecurity is enabled.
✔the Authorization DB is set up properly.
✔node binary found At/usr/local/bin/node
✔ios Checks.
all the content is now installed and now the question is how to start an actual demo. The best way to do that is to download the official demo.
Download Address Sample-code
In the terminal into the CD Downloads/samplecode-master/sample-code/apps/testapp, the directory is compiled with the following command to build the sample program: XCODEBUILD-SDK Iphonesimulator when you see Build succeeded indicates successful compilation
Note: This line of command creates a build/release-iphonesimulator directory underneath the TestApp project
This includes examples of python,ruby and so on.
So we go into the corresponding directory and run the ios_sample.py file (if you're going to open your Appium server, of course), and this time we can see the script running on the emulator.