In part 1 we looked at the set up of Appium when moving from Calabash. In the next articles we look at getting the ruby console (ARC) working to query your app, but first we have to generate an appium.txt file. This article will help you resolve the annoying App doesn’t exist error message relating to appium.txt when running the arc command.
Create the appium.txt file
The next step is to create the appium.txt file – simple right? Well when I first tried to this i hit a couple of problems.
The appium.txt tells appium what platform you are automating and what simulator you wish to use and where your app is (amongst other things). Although it is nicely explained in the Appium tutuorial it fails to point out three things
- You can create a sample empty appium.txt using the command
arc setup ios
2. Not everyone likes using nano to create files but if you use TextEdit to create / edit the appium.txt file you will end up with the wrong kind of double quotes and later on when you come to run the ARC (ruby console) you’ll get appium.txt errors. If this happens copy the correct double quoted from the file generated by the arc setup ios command.
3. When adding the path to you app, appium will automatically prefix it with the path to the folder where are running the arc command from i.e. it is a relative path, not an absolute path. if you use the absolute path to your app you will get an error something like this:
App doesn't exist
My appium.txt looks like this – you can use it as an example:
[caps] platformName = "ios" platformVersion = "9.0" deviceName ="iPhone 5s" app = "./myAppName.app" autoAcceptAlerts = "true" waitForAppScript = "true" [appium_lib] sauce_username = "" sauce_access_key = ""
I’ll explain the autoAcceptAlerts and waitForAppScript values in another article – running the Appium Ruby Console (arc).
In the next article i’ll explain the difference between building an app for calabash and building an app for Appium.