mirror of
https://github.com/appium/appium.git
synced 2026-02-15 06:20:22 -06:00
23 lines
736 B
JavaScript
23 lines
736 B
JavaScript
// This is basically a port of webdriver-test.py
|
|
// https://github.com/hugs/appium/blob/master/sample-code/webdriver-test.py
|
|
/*global it:true */
|
|
"use strict";
|
|
|
|
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:" + appiumPort + "/wd/hub/sessions"
|
|
, method: "GET"
|
|
, json: true
|
|
}, function(err, response, body) {
|
|
assert.equal(h.sessionId, body.value[0].id);
|
|
done();
|
|
});
|
|
});
|
|
});
|