Search code examples
rubycucumberreact-nativeappiumwatir-webdriver

Is there a better way to handle the path to the .app file when testing React Native apps using Appium?


I'm just getting my feet wet testing React Native apps and I was wondering whether there was an easier way to path to the app in the appium.txt file. That file looks like this:

[caps]
platformName = "ios"
deviceName = "iPhone 6"
platformVersion = "9.2"
waitForAppScript = true
app = "Library/Developer/CoreSimulator/Devices/923C1612-25BA-4206-9109-5C0B65B08897/data/Containers/Bundle/Application/B91B9D4B-5A95-4576-86D5-94060F7F3680/myapp.app"

[appium_lib]
sauce_username = false
sauce_access_key = false

the app = portion handles the path to the actual app file that appium will run my test suite against (I'm current using cucumber and watir-webdriver) but the problem is that every time I run that app from Xcode, the app UDID changes. Is there a better way to do this? Any help is appreciated.


Solution

  • Setting relative path in app=.../.../YOUR_PATH_TO_THE_APP/YOUR_APP.app will do the trick. It will take the app from that location and fire it up. No need to bother with XCode builds.

    Please see here example: appium.txt