I want to join a Zoom meeting using Puppeteer. Everytime I go to a meeting, I am given a modal that blocks me from running any other code. I try to close it, but nothing happens. Is this a different type of modal that I should be handling differently? My code:
Note: The logic to close it happens before we visit the link, as advised by some GitHub issues.
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
page.on('dialog', async (dialog) => {
console.log(dialog.message());
dialog.dismiss();
});
//Dialog will not close?
await page.goto(
'https://us05web.zoom.us/j/82821789760?pwd=vaRSUcEPsJCbh0EUrh40aKb0v6ugHp.1'
);
// Note: The meeting host must enable Show a "Join from your browser" link for their participants.
// Settings -> In Meeting (Advanced) -> Show a "Join from your browser" link
await page
.waitForSelector(
'#zoom-ui-frame > div.bhauZU7H > div > div.pUmU_FLW > h3:nth-child(2) > span > a'
)
.then((btn) => btn?.click());
await browser.close();
})();