make sure setValue and getContexts respect custom selendroid port (fix #3050)

This commit is contained in:
Jonathan Lipps
2014-07-11 13:56:11 -07:00
parent a4b1838ca1
commit 7adeed389e

View File

@@ -457,7 +457,7 @@ Selendroid.prototype.getContexts = function (cb) {
}
var selendroidViews = [];
var reqUrl = this.selendroidHost + ':' + this.selendroidPort + '/wd/hub/session/' + this.selendroidSessionId;
var reqUrl = this.proxyHost + ':' + this.proxyPort + '/wd/hub/session/' + this.selendroidSessionId;
doRequest(reqUrl + '/window_handles', 'GET', {}, null, function (err, res) {
if (err) return cb(err);
selendroidViews = JSON.parse(res.body).value;
@@ -488,7 +488,7 @@ Selendroid.prototype.setValue = function (elementId, value, cb) {
}
}
}
var reqUrl = this.selendroidHost + ':' + this.selendroidPort +
var reqUrl = this.proxyHost + ':' + this.proxyPort +
'/wd/hub/session/' + this.selendroidSessionId +
'/element/' + elementId + '/value';
doRequest(reqUrl, 'POST', { value: [value] }, null, function (err) {