MacにAppium環境を構築する
appium本体[編集 | ソースを編集]
appium本体をインストールする。
brew install appium
appium本体を常駐させる
brew services start appium
共通パッケージを入れる。
brew instal ffmpeg
android + UIAutomator 2.0[編集 | ソースを編集]
環境変数に以下が設定されていること。
- JAVA_HOME
- ANDROID_HOME
Android SDKのPlatform Toolsにパスが通っていること
- export PATH=$PATH:$ANDROID_HOME/platform-tools
uiautomator2のドライバーを入れる。
appium driver install uiautomator2
bundletoolを入れる。インテルMacとアップルシリコンMacでパスが違うので注意。 以下はインテルの例。古いインテルMac miniをAIエージェント専用機にする前提となっている。
brew install bundletool
ln -s /usr/local/bin/bundletool /usr/local/bin/bundletool.jar
GStreamerを入れる。
brew install gstreamer
問題ないか確認する。
appium driver doctor uiautomator2
iOS + xcuitest[編集 | ソースを編集]
xcuitestドライバーを入れる。
appium driver install xcuitest
applesimutilsを入れる。
brew tap wix/brew
brew install applesimutils
idb-companionを入れる。
brew tap facebook/fb
brew install idb-companion
idbを入れる。
pip3 install --user fb-idb
.zshrcにidbのパスを追加する。
export PATH="$(python3 -m site --user-base)/bin:$PATH"
問題ないか確認する。
appium driver doctor xcuitest
Mac Catalyst + Mac2[編集 | ソースを編集]
iOSアプリを作る際はMac Catalystでザックリ作ってから最後にiOS実機で微調整した方が捗る。ビルドと転送の手間が劇的に減る。
Mac無印とMac CatalystはどちらもMac2ドライバーとなっている。 mac2ドライバを入れる。
appium driver install mac2
自動化を許可する。
automationmodetool enable-automationmode-without-authentication
問題ないか確認する。
appium driver doctor mac2