To run the tests with Safari on iOS, follow these steps:
-
Install Xcode from the Mac App Store.
-
Install the Xcode Command Line Tools:
xcode-select --install
-
Install Node.JS and Carthage via Homebrew:
brew install node carthage
-
Make sure the necessary Appium dependencies for iOS testing are installed:
npx appium-doctor --ios
-
Install Appium as global NPM package:
npm install -g appium
-
Add the
example
host to your/etc/hosts
file:printf '127.0.0.1\t%s\n' example | sudo tee -a /etc/hosts
-
Start
appium
with the provided helper script:bin/appium.sh
-
Run the tests with Safari on iOS:
docker-compose run --rm wdio conf/safari-ios.js
To run the tests in landscape orientation, provide the
ORIENTATION
environment variable:ORIENTATION=LANDSCAPE docker-compose run --rm wdio conf/safari-ios.js
To use a different iOS device than defined in the config, provide the
DEVICE_NAME
environment variable:DEVICE_NAME='iPad Pro (11-inch) (3rd generation)' \ docker-compose run --rm wdio conf/safari-ios.js
To use a different iOS version than defined in the config, provide the
PLATFORM_VERSION
environment variable:PLATFORM_VERSION=15.0 docker-compose run --rm wdio conf/safari-ios.js