This steps are adapted to MacOSX, running Appium test for Android and iOS emulator.
Download the LTS version here: https://nodejs.org/es/download/
Or install node with Homebrew:
brew install node
- We suggest install version: v10.6.0.
brew install carthage
npm install -g appium --unsafe-perm=true --allow-root
To install a concrete version you can use:
npm install -g appium@1.12.1 --unsafe-perm=true --allow-root
- We suggest install version: 1.12.1.
The --unsafe-perm=true and --allow-root are necessary sometimes.
To check the Appium version installed, you need to run the command:
appium -v
Appium Doctor is a library that check if everything you need to start with Appium is properly installed. You can use it with Android and iOS.
Install Appium Doctor using Homebrew:
npm install -g appium-doctor
Check if everything you need to start with Appium and Android is correct:
appium-doctor --android --yes
Check if everything you need to start with Appium and iOS is correct:
appium-doctor --ios --yes
The WebDriverAgent is already installed when you installed Appium, but we need to configure it first in order to be able to use it.
URL of the project: https://github.com/facebook/WebDriverAgent
To configure the WebDriverAgent project you need to:
Go to Appium-XCUITest and WebDriverAgent folder:
cd "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/"
Create the following folder:
mkdir -p Resources/WebDriverAgent.bundle
Execute bootstrap script:
./Scripts/bootstrap.sh
To configure the WebDriverAgent project, you need to follow the instruction here
brew install libimobiledevice --HEAD
brew install ideviceinstaller
npm install -g ios-deploy --unsafe-perm=true --allow-root
sudo gem install xcpretty
npm install appium-ios-driver
If you prefer to have the Appium Desktop version, you can download it here: https://github.com/appium/appium-desktop/releases
To starts Appium you just have to type appium in a console and Appium process will start up.
appium [Appium] Welcome to Appium v1.12.1 [Appium] Appium REST http interface listener started on 0.0.0.0:4723
To stop Appium on your console, you need to type killall node and the Appium process will stop.
[Appium] Received SIGTERM - shutting down