mirror of
https://github.com/appium/appium.git
synced 2026-01-14 06:10:01 -06:00
* Sample code stub (#9887) * WD tests * WD sample code (#9918) * WebdriverIO sample code (#10166) * Ruby sample code (#10331) * PHP Sample Code (#10209) * Basic Android java test * Java sample code (#10427) * Sample code (#10834) * Sample code stub (#9887) * WD tests * WD sample code (#9918) * WebdriverIO sample code (#10166) * Ruby sample code (#10331) * PHP Sample Code (#10209) * Basic Android java test * Java sample code (#10427) * fixed WDIO test * Update .npmignore
28 lines
752 B
JavaScript
28 lines
752 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 () {
|
|
it('should create and destroy Android browser session', async function () {
|
|
// Connect to Appium server
|
|
const driver = await wd.promiseChainRemote(serverConfig);
|
|
|
|
// Start the session
|
|
await driver.init({
|
|
...androidCaps,
|
|
browserName: 'Chrome'
|
|
});
|
|
|
|
// 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');
|
|
|
|
// Quit the session
|
|
await driver.quit();
|
|
});
|
|
}); |