This page guides a user to build a test case for an iOS device using Appium Studio.
Connect the device
Connect your device using the USB cable. You can use a Windows machine!
Make sure you have iTunes installed and that it is up to date.
You can use iOS Simulator! See iOS simulator support.
Add Device to Studio
Click on the 'Add Device' icon and on 'iOS Device'.
If no Provisioning Profile can be found the following dialog will be presented.
Click on 'Configure Profile'.
Click on 'Add Profile'icon.
Select 'Register Your iOS Developer Account' and click 'Next'.
Enter your Apple developer account user and password. The credential will be used to register this device to your account and to download the 'Provisioning Profile'.
Open the device
Click on OK. And on 'Open Device'icon.
The device reflection should be open.
The device reflection is interactive, you can fully control the device from the reflection. You can also use the 'Object Spy'to analyze the current screen objects.
To work with your application you should first import it, click on the 'Import' icon. Select your IPA file if you work with a real device or .app file in case of a simulator.
You can use the ExperiBank application available in the applications repository.
Select the application you would like to work with.
Once a device and an application are selected you can select another capability, that will set your test/application life-cycle.
The selected capabilities will affect 1. Recording, 2. Code generation, 3. Execution within the studio.
Record your test
Click on the 'Record' button.
Wait for the device to be prepared for recording.
Start to perform the operations on the device reflection screen.
Use your mouse to simulate touch and swipe actions, and your keyboard to send keys.
It is recommended to end your recording on the same page you have started the recording. It will enable easily cycled execution when you debug your script.
After you stop the recording the script is generated in the studio test tab.
You can add new commands and modify the existing commands and commands parameters.
You can verify your recording is valid by executing the recorded script. Just click
Create new Appium project in eclipse (gradle)
- Create a new gradle project, File->New->Other...
- Select 'Gradle Project'
- Check the 'Create a simple project (skip archetype selection)' checkbox. Click the 'Next' button.
Open the newly created project, open the build.gradle file that was created. Replace the generated content with the following:
- Run the clean, cleanEclipse and eclipse task to prepare your Eclipse environment.
Create a new Test class
- Right-click on your test source folder, select New->Class
- Provide the name of your test. (You can also provide a package that your test will be placed in). Click 'Finish'.
Export your test into Eclipse
In Appium Studio click on the 'Copy to Clipboard'icon.
You can now paste your code into the new Java class you have created.