From b0c94a3d312ae9c417c2f0bcb47392306b6b972d Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 11 Nov 2020 01:38:44 +0300 Subject: feat: provide fillAttendance as onJoin() callback --- src/attendConference.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/attendConference.js') diff --git a/src/attendConference.js b/src/attendConference.js index 80dc1c5..c2a3de6 100644 --- a/src/attendConference.js +++ b/src/attendConference.js @@ -1,9 +1,10 @@ const { clickElementByXPath } = require('./utils.js'); -const attendConference = async page => { +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 -- cgit v1.2.3