How to automate any desktop application using Selenium WebDriver + AppiumForMac
Here i will go with Mac OS
We can achieve this by using AppiumForMac
Requirements
- Mac OS X 10.7 or later.
- Xcode 7.2.1 or later.
- AppiumForMac.
- appium java-client.
- Selenium stand alone server.
Mac OS X does not allow an application to use the Accessibility API without permission, so you have to enable it manually.
10.9, 10.10, 10.11, 10.12
- Open System Preferences > Security & Privacy.
- Click the Privacy tab.
- Click Accessibility in the left hand table.
- If needed, click the lock to make changes.
- If you do not see AppiumForMac.app in the list of apps, then drag it to the list from Finder.
- Check the checkmark next to AppiumForMac.app.
Setup
We are done with the requirements now lets start the setup.
Add appium java-client and Selenium stand alone server jars to your java project. and start AppiumForMac.app.
How to get AXPath
Now its easy to get AXPath, While AppiumForMac is running, just use the mouse to point to an element, then press the fn (function) key. AppiumForMac will build the AXPath of the element on screen, and copy it to the clipboard. You can then paste it into your script