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
32 lines
828 B
JavaScript
32 lines
828 B
JavaScript
import wd from 'wd';
|
|
import chai from 'chai';
|
|
import { androidCaps, serverConfig } from '../helpers/caps';
|
|
|
|
const {assert} = chai;
|
|
|
|
describe('Create Chrome web session', function () {
|
|
let driver;
|
|
before(async function () {
|
|
// Connect to Appium server
|
|
driver = await wd.promiseChainRemote(serverConfig);
|
|
|
|
// Start the session
|
|
await driver.init({
|
|
...androidCaps,
|
|
browserName: 'Chrome'
|
|
});
|
|
});
|
|
after(async function () {
|
|
// Quit the session
|
|
await driver.quit();
|
|
});
|
|
it('should create and destroy Android browser session', async function () {
|
|
// Navigate to google.com
|
|
await driver.get('https://www.google.com');
|
|
|
|
// Test that it was successful by checking the document title
|
|
const pageTitle = await driver.title();
|
|
assert.equal(pageTitle, 'Google');
|
|
});
|
|
});
|