Automating Mac Apps with Appium

April 13, 2026 · 10 min read · Tool Comparison

HeadSpin Platform
Automated & amp; manual testing made easy through data science insights.
Differentiating capableness:
  • Extensive end-to-end mechanization of QA process
  • Comparative analysis of app performance against peers
  • Uninterrupted monitoring of app performance habituate synthetic datum for high availability of apps
  • Easy-to-use developer friendly program
cloudtest go
Affordable Real Device Testing for Emerging Teams
cloudtest go
Affordable Real Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized wandering test performance in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based examination

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

retail

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

Automating Mac Apps with AppiumAutomating Mac Apps with Appium

Automating Mac Apps with Appium

Published on
January 16, 2019
Updated on
Published on
April 26, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps

Appium isn & # x27; t limited to automating mobile systems! As long as there is an open way to interact with a system, a driver can be written for it, and included in Appium. Using a project calledAppium For MacAppium can automate native macOs apps.

Setup

Appium comes bundle with a macOs driver, but the real AppiumForMac binary is not included, so we need to install it ourselves first:

  • Start by downloading the latest liberation fromhere.
  • Unzip the AppiumForMac.zip file by double-clicking it in Finder.
  • Move AppiumForMac.app file into your Applications folder.

AppiumForMac uses the system Accessibility API in order to automatise apps. We need to give expanded license to AppiumForMac in order for it to work. Here are instructions from theREADME:

Open System Preferences & gt; Security & amp; Privacy. Click the Privacy tab. Click Accessibility in the left mitt table. If require, click the lock to make modification. If you do not see AppiumForMac.app in the list of apps, then sweep it to the list from Finder. Check the checkbox next to AppiumForMac.app.

Enable Accessibility API for Appium For Mac

I & # x27; m using the latest adaptation of macOS (10.14.2), if you are use an earlier version, specific instructions are included in theAppiumForMac Readme.

Run a Test

The representative code for AppiumForMacalready automatise the computer app, so let & # x27; s do something different and automatize the Activity Monitor alternatively.

In order to automatize a macOs app, we only postulate to set the following desired capabilities:

{`` platformName '': `` Mac '', `` deviceName '': `` Mac '', `` app '': `` Activity Monitor ''}

For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.

We specify Mac as the platform and set app to the name of the installed app we want to run. Once a test has be started, an app can also be launched using the GET command, e.g.:

driver.get (`` Calculator '')

Absolute AXPath

AppiumForMac is a little tricky, since elements can but be found using a especial kind of XPath selector phone & quot; absolute AXPath & quot;. All the AXPath selectors use Accessibility API identifiers and properties. I & # x27; m including the exact rules for AXPath selectors below, but don & # x27; t be afraid if they do not make sense at first; in the next section I describe some tools for notice AXPath selectors.

Here are the rules for a valid Absolute AXPath picker:

  • Uses OS X Accessibility properties, e.g. AXMenuItem or AXTitle. You can not use any property of an element besides these.
  • Must begin with /AXApplication.
  • Must contain at least one other node follow /AXApplication.
  • Does not moderate & quot; // & quot;, or use a wildcard, or specify multiple paths using |.
  • Uses predicates with a single integer as an index, or one or more string comparisons expend = and! =.
  • May use boolean operators and or or in between multiple comparisons, but may not include both and and or in a individual statement. and and or must be surrounded by spaces.
  • Does not use predicate strings containing braces [] or parentheses ().
  • Uses single quotes, not double quotes for attribute strings.
  • Does not contain spaces except privileged quotes and surrounding the and and or operators.

Any XPath selector that follows the above convention will work as an absolute AXPath selector. Be warn: if your AXPath selector interrupt the rules, you won & # x27; t get a special error and instead will get an ElementNotFound exception. It can be unmanageable to name whether your selectors are failing because the AXPath is invalid or the component merely is not on the blind.

The READMEcontains the following examples as counseling:

Good examples: '' /AXApplication [@ AXTitle='Calculator '] /AXWindow [0] /AXGroup [1] /AXButton [@ AXDescription='clear '] '' '' /AXApplication [@ AXTitle='Calculator '] /AXMenuBarItems/AXMenuBarItem [@ AXTitle='View '] /AXMenu/AXMenuItem [@ AXTitle='Scientific '] '' '' /AXApplication/AXMenuBarItems/AXMenuBarItem [@ AXTitle='View '] /AXMenu/AXMenuItem [@ AXTitle='Basic ' and @ AXMenuItemMarkChar! = ''] '' Bad instance: '' //AXButton [@ AXDescription='clear '] '' (does not begin with /AXApplication, and contain //) '' /AXApplication [@ AXTitle='Calculator '] /AXWindow [0] /AXButton [@ AXDescription='clear '] '' (not an right-down path: missing AXGroup) '' /AXApplication [@ AXTitle= '' Calculator ''] /AXWindow [0] '' (a predicate string uses dual quotation) '' /AXApplication [@ AXTitle='Calculator '] '' (path do not contain at least two nodes) '' /AXApplication [@ AXTitle='Calculator '] /AXMenuBar/AXMenuBarItems/AXMenuBarItem [@ AXTitle= ' (Window) '] '' (a predicate twine contains proscribed quality) '' /AXApplication [@ AXTitle='Calculator '] /AXWindow [0] /AXGroup [1] /AXButton [@ AXDescription ='clear '] '' (a predicate contain a infinite before the =) '' /AXApplication [@ AXTitle='Calculator '] /AXWindow [view () > 3] /AXGroup [1] /AXButton [@ AXDescription='clear '] '' (a predicate is not a simple string or integer, and specifies more than one node) '' /AXApplication/AXMenuBarItems/AXMenuBarItem [@ AXTitle='View '] /AXMenu/AXMenuItem [@ AXTitle='Basic ' and @ AXMenuItemMarkChar! = ''] '' (leading and tail spaces necessitate for the boolean operator) '' /AXApplication [@ AXTitle= '' Calculator ''] /AXWindow [0] /AXButton [@ AXDescription='clear ' and @ AXEnabled='YES ' or @ AXDescription='clear all '] '' (predicate uses multiple kinds of boolean operators; use one or more 'and ', or, use one or more 'or ', but not both)

Tools for working with AXPath Selectors

This peculiar AXPath restriction is tricky to act with, but we have some tools at our disposal.

First of all, AppiumForMac provides a puppet for give the AXPath of any component on the screen. First, found the AppiumForMac app manually using Finder or Launchpad. It won & # x27; t display a window, but will appear in the dock. If you keep the fn key on your keyboard down for about three bit, AppiumForMac will find the AXPath twine to take whichever element your mouse cursor is presently hovering over. It stores the AXPath selector into your clipboard, so you can paste it into your test codification. You & # x27; ll know when it has worked because the AppiumForMac icon jumps out of the dock.

This behavior will work anyplace on your screen, because AppiumForMac can actually automatise anything which is available to the Accessibility API.

(NB: Third-party keyboards may not work with this functionality.)

I ground the AXPath strings yield by AppiumForMac to be reasonably long. Make certain to engineer your test so common component of the string can be reused. I also removed many of the predicates since they were too-specific and not necessary.

Another tool which can help with AXPath strings is theAccessiblity Inspector. This tool will show the hierarchy of accessibility element, allow you to click on an element to inspect it, and view property on ingredient.

As a last resort, you can try to underprice the total panorama hierarchy by calling driver.getSource (). This works on mere apps, but hung indefinitely on the Activity Monitor app, most likely because the UI is constantly updating.

The Test

Here & # x27; s an representative test which starts the Activity Monitor, switches between tabs, and performs a search:

import io.appium.java_client.AppiumDriver; import org.junit.After; importee org.junit.Assert; importee org.junit.Before; import org.junit.Test; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; importation java.io.IOException; import java.net.URL; import java.util.concurrent.TimeUnit; public family Edition052_Automate_Mac {private AppiumDriver driver; @ Before public void setUp () throws IOException {DesiredCapabilities caps = new DesiredCapabilities (); caps.setCapability (`` platformName '', `` Mac ''); caps.setCapability (`` deviceName '', `` Mac ''); caps.setCapability (`` app '', `` Activity Monitor ''); caps.setCapability (`` newCommandTimeout '', 300); driver = new AppiumDriver (new URL (`` http: //localhost:4723/wd/hub ''), cap); driver.manage () .timeouts () .implicitlyWait (5, TimeUnit.SECONDS);} @ After public vacancy tearDown () {try {driver.quit ();} catch (Exception ign) {}} @ Test populace nothingness testActivityMonitor () {String baseAXPath = `` /AXApplication [@ AXTitle='Activity Monitor '] /AXWindow ''; String tabSelectorTemplate = baseAXPath + `` /AXToolbar/AXGroup/AXRadioGroup/AXRadioButton [@ AXTitle= ' % s '] ''; driver.findElementByXPath (String.format (tabSelectorTemplate, `` Memory '')) .click (); driver.findElementByXPath (String.format (tabSelectorTemplate, `` Energy '')) .click (); driver.findElementByXPath (String.format (tabSelectorTemplate, `` Disk '')) .click (); driver.findElementByXPath (String.format (tabSelectorTemplate, `` Network '')) .click (); driver.findElementByXPath (String.format (tabSelectorTemplate, `` CPU '')) .click (); WebElement searchField = driver.findElementByXPath (baseAXPath + `` /AXToolbar/AXGroup/AXTextField [@ AXSubrole='AXSearchField '] ''); searchField.sendKeys (`` Activity Monitor ''); WebElement firstRow = driver.findElementByXPath (baseAXPath + `` /AXScrollArea/AXOutline/AXRow [0] /AXStaticText ''); Assert.assertEquals (`` Activity Monitor '', firstRow.getText ());}}

(As always, the total code sampling is also upon GitHub)

Caveats

AppiumForMac is rough around the edges, believably because it does not presently have a lot of community use. Check theGithub issuesif you get stuck.

Nothing prevents AppiumForMac from be improved; contributions welcome!

Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamical and results-driven Content Marketing Specialist with 8+ geezerhood of experience in crafting engaging narrative and market collateral across divers industries. She excels in collaborating with cross-functional team to develop groundbreaking message strategies and deliver compelling, authentic, and impactful content that resonates with target audiences and enhances brand authenticity.

LinkedIn

Automating Mac Apps with Appium

4 Parts

regression intelligence blog
-

Regression Intelligence practical guidebook for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guide for modern exploiter (Part 4)

Coming Soon

Discover how HeadSpin can empower your business with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with faster evolution rhythm
automated buil-over-build regression testing
Automate build-over-build fixation testing for reproducible solution
gain better visibility into functional & performance issues
Gain better visibility into functional and execution issues
reduce mean time
Reduce mean clip to identify/resolve during exam, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and contented quality of experience (QoE) effortlessly
The trusted choice for global initiative
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can empower your occupation with superior testing potentiality

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, profit a private-enterprise edge
faster development cycles
Boost developer/QA productivity with faster development cycle
automated buil-over-build regression testing
Automate build-over-build fixation testing for consistent issue
gain better visibility into functional & performance issues
Gain best profile into functional and performance issues
reduce mean time
Reduce meanspirited time to identify/resolve during test, QA, and product
evaluate audio, video & qoe
Evaluate sound, picture, and contented quality of experience (QoE) effortlessly
The trusted option for global enterprisingness
Close

Discover how HeadSpin can empower your business with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, win a competitive edge
faster development cycles
Boost developer/QA productiveness with faster development cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent results
gain better visibility into functional & performance issues
Gain best visibility into functional and performance issues
reduce mean time
Reduce mean time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate sound, picture, and content quality of experience (QoE) effortlessly
The trusted option for global enterprises
Close

Connet Now

Wipro LogoVMLYR Logo
Close
Book a Meeting
Products
footer down arrow
Solutions
footer down arrow
Industries
footer down arrow
Features
footer down arrow
Support
footer down arrow
Resource Center
footer down arrow
Why Choose HeadSpin?
footer down arrow
Copyright © 2026 HeadSpin, Inc. All Rights Reserved.

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free