bigbluebutton-Github/bigbluebutton-html5/tests/puppeteer/webcam/util.js

18 lines
496 B
JavaScript
Raw Normal View History

2020-03-05 03:00:45 +08:00
const we = require('./elements');
async function enableWebcam(test) {
// Enabling webcam
await test.waitForSelector(we.joinVideo);
await test.click(we.joinVideo);
await test.waitForSelector(we.videoPreview);
await test.waitForSelector(we.startSharingWebcam);
await test.click(we.startSharingWebcam);
}
async function getTestElement(element) {
(await document.querySelectorAll(element)[0]) !== null;
}
exports.getTestElement = getTestElement;
exports.enableWebcam = enableWebcam;