summaryrefslogtreecommitdiff
path: root/src/attendConference.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/attendConference.js')
-rw-r--r--src/attendConference.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/attendConference.js b/src/attendConference.js
deleted file mode 100644
index 54d6479..0000000
--- a/src/attendConference.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { clickElementByXPath } = require('./utils.js');
-
-const CONFERENCE_DURATION = 1000 * 60 * 80; // 80 minutes
-
-
-const attendConference = async (page, onJoin) => {
- // Join as "Listen only"
- await clickElementByXPath(page, '//span[contains(text(),"Listen only")]');
- if (typeof(onJoin) === 'function') onJoin();
- console.log('Joined the conference');
-
- // Wait 5 seconds
- await page.waitForTimeout(CONFERENCE_DURATION);
- console.log('Time to leave!')
-
- // Leave audio and close the tab
- await clickElementByXPath(page, '//button[contains(@aria-label,"Leave audio")]');
- await page.waitForTimeout(1500);
- await page.close();
- console.log('Left the conference');
-};
-
-module.exports = attendConference;