Creating emulators and simulators
We'll now look at how we can create emulators and simulators, starting with an iOS simulator and then move on to an Android simulator.
An iOS simulator
We don't need to create a simulator for Mac; it already comes with Xcode under developer tools. When you start the Appium server for the first time, it will prompt you to authorize the use of Instruments, or if you are running it from npm, run sudo authorize_ios
to work with the simulator.
An Android emulator
There are two ways to create an AVD for testing android apps:
- Create the AVD from the command line
- Create the AVD using the AVD Manager
Let's create AVD using the command line, as follows:
- Open the Command Prompt and type
android list targets
; this will generate a list of available targets. - Run
android create avd –n <name of the AVD> -t <targetID which you can get from the first step> --abi <again you can get it from first step>
.
Note
You can also customize the AVD with...