Skip to content

Instantly share code, notes, and snippets.

@rahulvramesh
Created July 15, 2022 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulvramesh/a69f04056eb34648e6e19024bfe05f7b to your computer and use it in GitHub Desktop.
Save rahulvramesh/a69f04056eb34648e6e19024bfe05f7b to your computer and use it in GitHub Desktop.
Google Meet Recorder Using playwright and firefox
const { devices, firefox, chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({headless: false});
const context = await browser.newContext({
permissions: ['geolocation', 'microphone', 'camera'],
colorScheme: 'dark',
recordVideo: {
dir: 'videos/',
size: { width: 1920, height: 1080 },
}
});
const page = await context.newPage();
await page.goto("https://accounts.google.com/signin/v2/identifier?ltmpl=meet&continue=https%3A%2F%2Fmeet.google.com%3Fhs%3D193&&o_ref=https%3A%2F%2Fwww.google.com%2F&_ga=2.148131575.1122321865.1657821818-413460945.1657821818&flowName=GlifWebSignIn&flowEntry=ServiceLogin", { waitUntil: "networkidle" })
await page.waitForSelector('#identifierId');
await page.type('#identifierId', 'email@email.com');
await page.click('#identifierNext');
await page.waitForSelector('input[type="password"]');
await page.type('input[type="password"]', 'password');
await page.click('#passwordNext');
await page.waitForSelector('input[type="text"]');
await page.type('input[type="text"]', "https://meet.google.com/sor-urcr-hqz");
await page.click('//*[@id="yDmH0d"]/c-wiz/div/div[2]/div/div[1]/div[3]/div/div[2]/div[2]/button');
await page.waitForSelector('//*[@id="ucj-2"]');
await page.click('//*[@id="yDmH0d"]/c-wiz/div/div/div[10]/div[3]/div/div[1]/div[4]/div/div/div[2]/div/div[2]/div/div[1]/div/button');
await page.waitForTimeout(5000);
await context.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment