Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* global appController */
/**
* This tests fails if you clap or scream while the test is running
*
* @author Christian Bromann
* @license MIT
*/
var WebdriverIO = require('webdriverio')
var WebdriverRTC = require('../')
var assert = require('assert')
var inputLevel
var matrix = WebdriverIO.multiremote({
browserA: {
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: { args: ['use-fake-ui-for-media-stream'] }
}
},
browserB: {
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: { args: ['use-fake-ui-for-media-stream'] }
}
}
})
WebdriverRTC.init(matrix, {
browser: 'browserA'
it(`should work in ${b1.browserName}@${b1.version}-${b2.browserName}@${b2.version}`, function () {
this.timeout(180000);
const browsers = webdriverio.multiremote(cOpts);
console.log('Running init');
return browsers.init().then(() => {
console.log('Starting tests');
return executeBasicFlow(browsers);
}).then(
() => browsers.end(),
(err) => {browsers.end(); throw err;});
});
}
beforeEach(function() {
this.timeout(5000);
browserA = webdriverio.multiremote({
desiredCapabilities: {
browserName: 'firefox'
}
}).init();
browserB = webdriverio.multiremote({
desiredCapabilities: {
browserName: 'firefox'
}
}).init();
});
assert.strictEqual(elementSize.width, 32);
const title = await client.getTitle();
assert.isString(title);
assert.strictEqual(title, "The world's leading software development platform · GitHub");
const cssProperty = await client.getCssProperty("a[href='/pricing']", "color");
assert.strictEqual(cssProperty.value, "rgba(255,255,255,1)");
});
after(async () => {
await client.end();
});
});
const matrix = webdriverio.multiremote({
browserA: {
desiredCapabilities: {
browserName: "chrome",
chromeOptions: {
args: [
"use-fake-device-for-media-stream",
"use-fake-ui-for-media-stream",
]
}
}
},
browserB: {
desiredCapabilities: {
browserName: "chrome",
chromeOptions: {
args: [
assert.strictEqual(elementSize.width, 89);
var title = client.getTitle();
assert.isString(title);
assert.strictEqual(title, "GitHub · Where software is built");
var cssProperty = client.getCssProperty("a[href='/plans']", "color");
assert.strictEqual(cssProperty.value, "rgba(64,120,192,1)");
});
after(function() {
client.end();
});
});
var matrix = webdriverio.multiremote({
browserA: {
desiredCapabilities: {
browserName: "chrome",
chromeOptions: {
args: [
"use-fake-device-for-media-stream",
"use-fake-ui-for-media-stream",
]
}
}
},
browserB: {
desiredCapabilities: {
browserName: "chrome",
chromeOptions: {
args: [
var WebdriverIO = require('webdriverio')
var WebdriverRTC = require('../')
var path = require('path')
var args = [
'use-fake-device-for-media-stream',
'use-fake-ui-for-media-stream'
]
var argsBrowserA = args.slice(0, args.length)
argsBrowserA.push('use-file-for-fake-video-capture=' + path.join(__dirname, 'fixtures', 'sign_irene_qcif.y4m'))
var argsBrowserB = args.slice(0, args.length)
argsBrowserB.push('use-file-for-fake-video-capture=' + path.join(__dirname, 'fixtures', 'silent_qcif.y4m'))
var matrix = WebdriverIO.multiremote({
browserA: {
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: { args: argsBrowserA }
}
},
browserB: {
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: { args: argsBrowserB }
}
}
})
WebdriverRTC.init(matrix, {
browser: 'browserA'