bigbluebutton-Github/bigbluebutton-html5/tests/puppeteer/screenshare/util.js
Mohamed Amine Ben Salah f3dcdc5379 adds screensharing test
2020-03-12 10:50:54 -03:00

22 lines
673 B
JavaScript

const e = require('../core/elements');
async function startScreenshare(test) {
await test.waitForSelector(e.screenShare);
await test.click(e.screenShare, true);
}
async function getTestElement(element) {
(await document.querySelectorAll(element)[0]) !== null;
}
async function getScreenShareContainer(test) {
await test.waitForSelector(e.screenShareVideo);
const screenShareContainer = await test.evaluate(getTestElement, e.screenshareVideo);
const response = screenShareContainer !== null;
return response;
}
exports.getScreenShareContainer = getScreenShareContainer;
exports.getTestElement = getTestElement;
exports.startScreenshare = startScreenshare;