Merge pull request #851 from jlipps/master

fixing misc issues with tests
This commit is contained in:
Jonathan Lipps
2013-07-02 17:06:51 -07:00
5 changed files with 19 additions and 7 deletions

View File

@@ -598,7 +598,9 @@ ADB.prototype.startAppium = function(onReady, onExit) {
function(cb) { me.wakeUp(cb); },
function(cb) { me.unlockScreen(cb); },
function(cb) { me.startApp(cb); }
], onReady);
], function(err, seriesInfo) {
onReady(err);
});
};
ADB.prototype.startChrome = function(onReady) {

View File

@@ -405,11 +405,19 @@ Android.prototype.handleFindCb = function(err, res, many, findCb) {
};
Android.prototype.findElementFromElement = function(element, strategy, selector, cb) {
this.findElementOrElements(strategy, selector, false, element, cb);
if (this.inWebView()) {
this.findWebElementOrElements(strategy, selector, false, element, cb);
} else {
this.findUIElementOrElements(strategy, selector, false, element, cb);
}
};
Android.prototype.findElementsFromElement = function(element, strategy, selector, cb) {
this.findElementOrElements(strategy, selector, true, element, cb);
if (this.inWebView()) {
this.findWebElementOrElements(strategy, selector, true, element, cb);
} else {
this.findUIElementOrElements(strategy, selector, true, element, cb);
}
};
Android.prototype.setValueImmediate = function(elementId, value, cb) {

View File

@@ -5,12 +5,13 @@
var describeWd = require("../../helpers/driverblock.js").describeForApp('TestApp')
, assert = require("assert")
, appiumPort = process.env.APPIUM_PORT || 4723
, request = require("request");
describeWd('check getSessions', function(h) {
return it('should return appear in the sessions returned', function(done) {
request({
url: "http://localhost:4723/wd/hub/sessions"
url: "http://localhost:" + appiumPort + "/wd/hub/sessions"
, method: "GET"
, json: true
}, function(err, response, body) {

View File

@@ -8,7 +8,7 @@ var wd = require('wd')
, path = require("path")
, should = require("should")
, defaultHost = '127.0.0.1'
, defaultPort = 4723
, defaultPort = process.env.APPIUM_PORT || 4723
, defaultCaps = {
browserName: ''
, device: 'iPhone Simulator'

View File

@@ -4,8 +4,9 @@
var driverBlock = require("./driverblock.js")
, describeSafari = driverBlock.describeForSafari()
, describeChrome = driverBlock.describeForChrome()
, testEndpoint = 'http://localhost:4723/test/'
, chromeEndpoint = 'http://10.0.2.2:4723/test/'
, appiumPort = process.env.APPIUM_PORT || 4723
, testEndpoint = 'http://localhost:' + appiumPort + '/test/'
, chromeEndpoint = 'http://10.0.2.2:' + appiumPort + '/test/'
, guinea = testEndpoint + 'guinea-pig'
, chromeGuinea = chromeEndpoint + 'guinea-pig'
, _ = require('underscore')