-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright_debug.js
More file actions
32 lines (25 loc) · 1.06 KB
/
playwright_debug.js
File metadata and controls
32 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
const page = await context.newPage();
console.log('Navigating to robot debug page...');
await page.goto('https://chat.boltbrain.ca/robot_debug');
// Wait for page to load
await page.waitForTimeout(2000);
// Take initial screenshot
await page.screenshot({ path: '/tmp/robot_debug_initial.png', fullPage: true });
console.log('Screenshot saved: /tmp/robot_debug_initial.png');
// Click the speak button if it exists
const speakButton = await page.locator('button:has-text("Speak:")').first();
if (await speakButton.isVisible()) {
console.log('Clicking speak button...');
await speakButton.click();
await page.waitForTimeout(1000);
await page.screenshot({ path: '/tmp/robot_debug_speaking.png', fullPage: true });
console.log('Screenshot saved: /tmp/robot_debug_speaking.png');
}
await page.waitForTimeout(3000);
await browser.close();
console.log('Done!');
})();