mirror of
https://github.com/appium/appium.git
synced 2026-01-23 10:40:17 -06:00
@@ -1,29 +1,23 @@
|
||||
const webdriverio = require("webdriverio");
|
||||
const androidOptions = require("../../helpers/caps").androidWebOptions;
|
||||
const app = require("../../helpers/apps").androidApiDemos;
|
||||
const assert = require("chai").assert;
|
||||
|
||||
describe("Create Chrome web session", function() {
|
||||
let client;
|
||||
|
||||
before(function() {
|
||||
client = webdriverio.remote(androidOptions);
|
||||
return client.init();
|
||||
before(async function() {
|
||||
client = await webdriverio.remote(androidOptions);
|
||||
});
|
||||
|
||||
after(function() {
|
||||
return client.end();
|
||||
after(async function() {
|
||||
return await client.deleteSession();
|
||||
});
|
||||
|
||||
it("should create and destroy Android browser session", async function() {
|
||||
// Navigate to google.com
|
||||
return client
|
||||
.url("https://www.google.com")
|
||||
.title(function(res) {
|
||||
assert.equal(res.value, "Google");
|
||||
})
|
||||
.source(function(res) {
|
||||
assert.match(/<html/g);
|
||||
});
|
||||
let client = await webdriverio.remote(iosOptions);
|
||||
await client.url("https://www.google.com");
|
||||
const title = await client.getTitle();
|
||||
assert.equal(title, "Google");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user