Install Appium 2.0 Beta on Mac aarch64

February 2, 2023
 
Automated Behavioral Testing for your mobile applications on Apple M1 ARM CPU
This document will walk you through a complete installation of Appium and its dependencies. These installation instructions are intended for developers and test engineers.

Appium 1.0 Safari Web Driver Errors

You may have landed on this page searching for the solution to these common errors encountered with appium on your M1 or M2 processor:

  • Cannot link directly with dylib/framework, your binary is not an allowed for architecture arm64
  • [WebDriverAgent] xcodebuild exited with code '65' and signal 'null'
  • [WD Proxy] connect ECONNREFUSED 127.0.0.1:8100

Using appium 2.0 in beta will fix these issues. You could also fix in appium 1.0 by updating the web driver manually, but I prefer this path.


This article is part of a series which provides sample Java code to run a JUnit 5 tests that will interact with mobile devices and simulators using Appium 2.0 to perform automated testing:
  • Install Appium (this article)
  • iOS automated web test
  • iOS automated local native application test
  • Android automated web test
  • Android automated local native application test

Installation

At the time of writing this article, Appium 2.0 was still in the beta stages, so need to use appium@next to install it:
npm install -g appium@next

If you encounter a permissions error during your attempt to add the global module, you can grant permissions to the global folders. This will allow you to run without sudo:

sudo chmod -R ugo+rwx /usr/local/lib/node_modules
sudo chmod -R ugo+rwx /usr/local/bin

Drivers

Install the driver for Android:
appium driver install uiautomator2

Install the driver for iOS:
appium driver install xcuitest

Appium Doctor

It is recommended to install appium doctor so that you could ensure you have all the required components to fully utilize all of appium. If some components are missing it will instruct you on how to install:
npm install @appium/doctor --location=global

Run appium doctor for Android

appium-doctor –-android

Run appium doctor for iOS

appium-doctor –-ios

Appium 2.0 Migration Notes

  • The Appium Desktop is being deprecated in appium 2.0. You will want to use the new Appium Inspector with the command line appium 2.0 server to support the same functionality.
  • The default remote server path has changed from /wd/hub to / to reflect Appium 2.0's default server path.
  • Appium 2.0 uses new W3C WebDriver protocol.
  • Appium 2.0 documentation.


Start Appium

To start Appium, open a terminal window and type the appium command

appium

If you plan on performing tests using the Chrome web browser on you mobile device and don't want to have to keep updating the web drivers manually, you can have the drivers automatically updated as follows:

appium --allow-insecure chromedriver_autodownload

References

 
Return to articles