Files
appium/test/helpers/app.js
T
Jonathan Lipps 6f4f275180 don't fail test if we can't find strings.xml (fix #1905)
also, make sure apidemos tests run as android even if DEVICE isn't set
2014-02-14 10:54:03 -08:00

25 lines
613 B
JavaScript

"use strict";
var env = require('./env'),
path = require('path');
module.exports.getAppPath = function (app, device) {
if (device && device[0] === "i") {
env.IOS = true;
env.ANDROID = false;
} else if (device && device.toLowerCase() === "android") {
env.ANDROID = true;
env.IOS = false;
}
if (env.IOS) {
return path.resolve(__dirname, "../../sample-code/apps/" + app +
"/build/Release-iphonesimulator/" + app + ".app");
}
if (env.ANDROID) {
return path.resolve(__dirname, "../../sample-code/apps/" + app +
"/bin/" + app + "-debug.apk");
}
return app;
};