← back to Sublease Agentabrams

tmp-shot-live.js

15 lines

const { chromium } = require('playwright-core');
(async () => {
  const b = await chromium.launch({ executablePath: process.env.CHROMIUM });
  const ctx = await b.newContext({ httpCredentials: { username:'Boomer', password:'Sublease2024!' }, viewport:{width:1400,height:1600} });
  const pg = await ctx.newPage();
  await pg.goto('https://sublease.agentabrams.com/', { waitUntil:'networkidle', timeout:30000 });
  await pg.waitForTimeout(2500);
  await pg.screenshot({ path:'tmp-home.png', fullPage:true });
  const pg2 = await ctx.newPage();
  await pg2.goto('https://sublease.agentabrams.com/broker/premierworkspaces', { waitUntil:'networkidle', timeout:30000 });
  await pg2.waitForTimeout(1500);
  await pg2.screenshot({ path:'tmp-broker.png', fullPage:true });
  await b.close();
})();