mirror of
https://github.com/appium/appium.git
synced 2026-01-14 06:10:01 -06:00
* Lint and update JS wd sample code * Lint and update JS webdriverio sample code * Add JS sample code to greenkeeper
27 lines
803 B
JavaScript
27 lines
803 B
JavaScript
import wd from 'wd';
|
|
import chai from 'chai';
|
|
import { androidCaps, serverConfig } from '../helpers/caps';
|
|
|
|
const {assert} = chai;
|
|
|
|
describe('Create Android session', function () {
|
|
it('should create and destroy Android sessions', async function () {
|
|
// Connect to Appium server
|
|
const driver = await wd.promiseChainRemote(serverConfig);
|
|
|
|
// Start the session
|
|
await driver.init({
|
|
...androidCaps,
|
|
app: require('../helpers/apps').androidApiDemos
|
|
});
|
|
|
|
// Check that we're running the ApiDemos app by checking package and activity
|
|
const activity = await driver.getCurrentActivity();
|
|
const pkg = await driver.getCurrentPackage();
|
|
assert.equal(`${pkg}${activity}`, 'io.appium.android.apis.ApiDemos');
|
|
|
|
// Quit the session
|
|
await driver.quit();
|
|
});
|
|
});
|